---
name: "BIS_fnc_removeFromPairs"
type: function
status: ok
groups: ["Arrays"]
arma3_since: "1.00"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_removeFromPairs
revid: 363590
updated: 2024-04-07T18:25:56Z
---

# BIS_fnc_removeFromPairs

*Function · Arrays · Arma 3 v1.00*

## Description

Removes an item from pair array, modifying or not the original array.

## Syntax

```sqf
[array, key, copyArray] call BIS_fnc_removeFromPairs
```

**Parameters:**

- `array`: [Array](../topics/Array.md) - array to search through
- `key`: [String](../topics/String.md) - key to search for
- `copyArray`: [Boolean](../topics/Boolean.md) - (Optional, default [false](../commands/false.md)) [true](../commands/true.md) to copy the array and return it, [false](../commands/false.md) to modify the original array

**Returns:** [Array](../topics/Array.md) - resulting modified array or a copy

## Examples

### Example 1

```sqf
private _pairs = [[["apple", 3], ["pear", 2]], "pear"];
[_pairs, "pear", true]    call BIS_fnc_removeFromPairs; // returns [["apple", 3]] - _pairs is not modified
[_pairs, "pear"]        call BIS_fnc_removeFromPairs; // returns [["apple", 3]] - _pairs is now [["apple", 3]]
```

## See also

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

<sub>Source: [BI Community Wiki — BIS fnc removeFromPairs](https://community.bistudio.com/wiki/BIS_fnc_removeFromPairs) (revision 363590).</sub>
