Arma 3 Scripting

BIS_fnc_getFromPairs

  • Arma 3 v1.02

Function · Markdown · JSON · original wiki page

Description

Searches the associative array for the 1st occurance of the key string and returns the value associated with it. Search is not case sensitiv.

Syntax

[array, key, defaultValue] call BIS_fnc_getFromPairs

Parameters:

Returns: Anything - value associated with the key.

Examples

Example 1

[[["apple",3],["pear","test"]],"pear"] call BIS_fnc_getFromPairs; // Returns "test"

Example 2

[[["apple",3],["pear",6]],"pear"] call BIS_fnc_getFromPairs; // Returns "6"

See also

find · findIf · BIS_fnc_findInPairs · BIS_fnc_addToPairs · BIS_fnc_removeFromPairs · BIS_fnc_setToPairs

Community notes