Searches an array for all positions of a specified value. The function searches for simple values such as strings and numbers or for complex objects such as structures. When the second parameter is a simple value, string searches are case-sensitive
arrayFindAllNoCase(array, value or callback)
returns array
someArray.findAllNoCase(value or callback)
Name | Type | Required | Default | Description |
---|---|---|---|---|
array | array | Yes | The source array to search through | |
value or callback | variableName | Yes | If string, case insensitive value to search for; if callback, use signature function (item, index, array) : boolean |
Find the positions of a given string within a provided array regardless of case.
var fruitArray = ['apple','banana','apple','orange','kiwi'];
var applePositions = arrayFindAllNoCase(fruitArray, 'APPLE');
writeDump(applePositions);