private _supplyCratesCfg = call milsim_resupply_fnc_getSupplyCratesCfg; 
 
private _properties = []; 
{ 
	_properties append ((configProperties [_x]) apply {configName _x}); 
} forEach (_supplyCratesCfg call BIS_fnc_returnChildren);

_properties = _properties arrayIntersect _properties;

private _cfgVals = [];
{
	private _cfg = _x;
	private _cfgName = configName _x;
	_vals = createHashMap;

	{
		_vals set [_x, (_cfg >> _x) call BIS_fnc_getCfgData];
	} forEach _properties;

	{
		private _arr = _vals get _x;
		private _newArr = [];
		{
			_x params ["_class", "_count"];
			private _cfg = _class call CBA_fnc_getItemConfig;
			private _name = [_cfg] call BIS_fnc_displayName;
			_newArr pushBack [_class, _name, _count];
		} forEach _arr;
		_vals set [_x, _newArr];
	} forEach ["backpacks", "weapons", "items", "magazines"];

	_cfgVals pushBack [_cfgName, _vals];
} forEach (_supplyCratesCfg call BIS_fnc_returnChildren);

text ([createHashMapFromArray _cfgVals] call CBA_fnc_encodeJSON);