---
title: "array:filter — Filter array items"
description: "iXML command array:filter: Filter array items."
canonical_url: "https://www.zeyos.com/ixml/ref/array-filter"
markdown_url: "https://www.zeyos.com/ai/guide/ixml/ref/array-filter.md"
section: "ixml-reference"
authority: "reference"
language: "en"
source_repository: "https://cloud.zeyos.com/__doc/ixmldoc.xml"
source_sha256: "a23f04e6a98628ca3c273c3b8dd2c33c034cfda3e0f00478d8793074fd2f70dd"
---

# array:filter — Filter array items

ARRAY:FILTER filters an array by extracting those items of an array whose values meet the given condition.

A given key may specify the column of a multidimensional array to filter by. If however, the key is omitted, then the array is treated as an unidimensional list.

Comparison of numeric values is always performed numerically regardless of the intrinsic data types.

### Attributes
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| var | var |  | Variable name |
| var_result | var | (destructive on 'var') | Result variable name |
| value | string\|regexp |  | Value to compare to |
| func | string | = | Comparison function |

#### Possible values
Possible values for `func`:
- = — Equals
- =* — Equals, case-insensitive
- != — Not equals
- <> — Not equals
- !=* — Not equals, case-insensitive
- <>* — Not equals, case-insensitive
- < — Less than
- <= — Less than or equal to
- > — Greater than
- >= — Greater than or equal to
- _ — Contains
- _* — Contains, case-insensitive
- !_ — Not contains
- !_* — Not contains, case-insensitive
- ^ — Starts with
- ^* — Starts with, case-insensitive
- !^ — Not starts with
- !^* — Not starts with, case-insensitive
- $ — Ends with
- $* — Ends with, case-insensitive
- !$ — Not ends with
- !$* — Not ends with, case-insensitive
- ~ — Matches regular expression
- !~ — Not matches regular expression


### Children
- (none)

### Parents
- (not restricted in the reference)

### Result
- binding: var|var_result; type: array; predicate: no-result-propagation
