{"name":"BIS_fnc_findInPairs","operator":null,"title":"BIS fnc findInPairs","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_findInPairs","revid":348806,"updated":"2023-11-08T14:37:38Z","groups":["Arrays"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"0.76"}],"since":{"game":"arma3","name":"Arma 3","version":"0.76"},"arma3_since":"0.76","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Searches the associative array for the first occurance of the key string and returns its index. Seach is not case-sensitive.","syntaxes":[{"syntax":"[array, key] call BIS_fnc_findInPairs","since":null,"effect":null,"exec":null,"params":[{"name":"array","type":"Array","optional":false,"default":null,"description":"array to search through","types":["Array"],"since":null,"text":"array: Array - array to search through"},{"name":"key","type":"String","optional":false,"default":null,"description":"key to search for","types":["String"],"since":null,"text":"key: String - key to search for"}],"returns":{"type":"Number","types":["Number"],"description":"index of first occurence","text":"Number - index of first occurence"}}],"examples":[{"text":"```sqf\n[[[\"apple\",3],[\"pear\",2]],\"apple\"] call BIS_fnc_findInPairs; // Returns 0\n```","code":["[[[\"apple\",3],[\"pear\",2]],\"apple\"] call BIS_fnc_findInPairs; // Returns 0"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["find","findIf","BIS_fnc_getFromPairs","BIS_fnc_addToPairs","BIS_fnc_removeFromPairs","BIS_fnc_setToPairs"],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Arrays","Functions","Introduced with Arma 3 version 0.76"],"docblock":null,"filled_from_docblock":[]}