array.findAll()

These functions searches the array for the specified object and return the positions of all occurrence of this values.

array.findAll( value_or_closure=any )

Returns: Array

Argument Description
value_or_closure
any, required

The value to find or a closure/function that gets every value of the array as input and returns true if the given value is right.

Alias: object, value, closure, function, udf, callback

Examples

numbers = ["one","two","three","four","one","one","two","one"];
	res = numbers.findall("one");
	writeDump(res);
	fruits = ["apple","orange","banana","orange","orange"];
	res = fruits.findall("orange");
	writeDump(res);

See also