---
name: "BIS_fnc_findInPairs"
type: function
status: ok
groups: ["Arrays"]
arma3_since: "0.76"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_findInPairs
revid: 348806
updated: 2023-11-08T14:37:38Z
---

# BIS_fnc_findInPairs

*Function · Arrays · Arma 3 v0.76*

## Description

Searches the associative array for the first occurance of the key string and returns its index. Seach is not case-sensitive.

## Syntax

```sqf
[array, key] call BIS_fnc_findInPairs
```

**Parameters:**

- `array`: [Array](../topics/Array.md) - array to search through
- `key`: [String](../topics/String.md) - key to search for

**Returns:** [Number](../topics/Number.md) - index of first occurence

## Examples

### Example 1

```sqf
[[["apple",3],["pear",2]],"apple"] call BIS_fnc_findInPairs; // Returns 0
```

## See also

[find](../commands/find.md) · [findIf](../commands/findIf.md) · [BIS_fnc_getFromPairs](../functions/BIS_fnc_getFromPairs.md) · [BIS_fnc_addToPairs](../functions/BIS_fnc_addToPairs.md) · [BIS_fnc_removeFromPairs](../functions/BIS_fnc_removeFromPairs.md) · [BIS_fnc_setToPairs](../functions/BIS_fnc_setToPairs.md)

<sub>Source: [BI Community Wiki — BIS fnc findInPairs](https://community.bistudio.com/wiki/BIS_fnc_findInPairs) (revision 348806).</sub>
