CBA_fnc_hashEachPair

Description

Iterate through all keys and values in a Hash.

Data passed to the function on each iteration,

  • _key - Key from the Hash.
  • _value - The value from the Hash corresponding to _key.

See CBA_fnc_hashCreate.

Parameters

_hashHash to iterate [Array which is a Hash structure]
_codeFunction to call with each pair [Any]

Returns

nil

Example

_dumpHash = {
    diag_log format ["Key: %1, Value: %2", _key, _value];
};

[_hash, _dumpHash] call CBA_fnc_hashEachPair;

Author

Spooner

Creates a new Hash
Close