Policies & Guidelines

IS_IN_ARRAY

Is the given item in the source array?

Description

Given an array and an item whose schema matches the array's schema, return true if exactly that item can be found in the array, or false if it is not found.

Function signature

IS_IN_ARRAY(array: Array, item: ) => Boolean

Parameter

Description

Array

Array to check item

Item

Item to check

Examples

array = [100,3,20]

Formula

Return value

IS_IN_ARRAY(array, 3)

true

IS_IN_ARRAY(array, 1)

false

IS_IN_ARRAY([100, 3, { a: 10 }], { a: 10 })

true