SocialluxSociallux
Toggle navigation menu
Docs navigationv

Primitive

array.filter

BETA

Short name: filter

Version: 1.0.0

Filter an array of objects by a value at a key path. With `contains` (case-insensitive substring) or `equals` (exact). An empty/absent criterion returns the array unchanged, so a blank query is a no-op.

Back to primitive library

Inputs

KeyTypeRequiredDescription
arrayarraytrueArray of source objects to filter.
containsstringfalseCase-insensitive substring the path value must contain.
equalsstringfalseExact value the path must equal.
pathstringtrueKey path to compare on each element (e.g. 'title').

Outputs

KeyTypeRequiredDescription
resultarrayfalseFiltered array copy.