PHP
php.net › manual › en › function.array-filter.php
PHP: array_filter - Manual
Note that a filtered array no longer encodes to json arrays, as the indices are no longer continuous: $a = ['a', 'b', 'c']; var_dump(json_encode($a)); // ["a","b","c"] $a = array_filter($a, function ($x) { return $x == 'b'; }); var_dump(json_encode($a)); // {"1": "b"} you can use array_values get a continuous array var_dump(json_encode(array_values($a))); // ["b"]
npm
npmjs.com › package › array-filter
array-filter - npm
Array#filter for older browsers.. Latest version: 1.0.0, last published: 11 years ago. Start using array-filter in your project by running `npm i array-filter`. There are 309 other projects in the npm registry using array-filter.
» npm install array-filter
Published May 18, 2015
Version 1.0.0
Author Julian Gruber
Repository https://github.com/juliangruber/array-filter
How do I implement a fast way to filter a large array of 20k objects?
I’m building an Ionic app. The app contains an array of 20k “word” objects with the word and pronunciation. This data is all local and is used via a service. There’s a search page with a search input that on keydown makes a new search request and updates the “DOM.” The time it takes ... More on forum.ionicframework.com
Filter an item in array if it includes search term (contains) & only get first match
Hi, I’m looking for a bit of help. I am trying to get a single value from an array if the item includes a search trem. Note, it does not have to be exactly equal to, but should contain the variable. I have the followin… More on community.make.com
Filter pipe for multiple fields with nested array
you need to iterate over the listOfItems array from within the filter function - find will do it for you. i can't remember the exact syntax for pipes off the top of my head but here's a function that should do what you want:
specialSearch(obj) {
myArray.filter(entry => {
return entry.name === obj.name && entry.listOfItems.find(item => item.description === obj.description);
});
}so we only allow entries in the top-level array that both have a name matching the name we input, but we must also find an item in listOfItems that has a description matching the description we input.
More on reddit.comA slightly faster array filter
I see that you have moved away from searching for 'w', but I was wondering if you were only focused only on the 'Where' capabilities? On my system (PowerShell 5.1) this seems to go faster than your 'Where' and 'Class' examples measure-command { foreach ($i in 0..1kb) { foreach($item in $files){if([char]$item.Name[0] -match 'w') {$item}} } } | Select-Object -ExpandProperty TotalMilliseconds Your example times on my system (far fewer 'w' files than you): 303.2 265.6 My example 189.2 More on reddit.com
Videos
04:19
How to filter an array in PHP - YouTube
04:26
Getting Used To With array_filter() function - In 4 Minutes - YouTube
11:15
How to Use filter() in JavaScript | Filter Arrays Like a Pro - YouTube
06:03
Array Filter vs. Array Find in JavaScript - YouTube
- YouTube
W3Schools
w3schools.com › php › func_array_filter.asp
PHP array_filter() Function
The array_filter() function filters the values of an array using a callback function.
Codecademy
codecademy.com › docs › javascript › arrays › .filter()
JavaScript | Arrays | .filter() | Codecademy
July 29, 2025 - JavaScript’s array.filter() method creates a new array containing only the elements from the original array that pass a test implemented by a provided function.
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Array › filter
Array.prototype.filter() - JavaScript | MDN
December 13, 2025 - The filter() method of Array instances creates a shallow copy of a portion of a given array, filtered down to just the elements from the given array that pass the test implemented by the provided function.
TutorialsPoint
tutorialspoint.com › filter-array-with-filter-and-includes-in-javascript
Filter array with filter() and includes() in JavaScript
In this article, using the filter() and includes() methods in JavaScript, we can filter an array based on the elements presence in another array or specific conditions. For suppose we have two arrays as array1 and array2. we want to filter array1 to
Mimo
mimo.org › glossary › javascript › filter
Master JavaScript Filter Operator: Apply Filter Arrays
The JavaScript filter() method creates a new array with all elements that pass the test implemented by the provided function.
Ionic Framework
forum.ionicframework.com › ionic framework › ionic-v3
How do I implement a fast way to filter a large array of 20k objects? - ionic-v3 - Ionic Forum
February 2, 2018 - I’m building an Ionic app. The app contains an array of 20k “word” objects with the word and pronunciation. This data is all local and is used via a service. There’s a search page with a search input that on keydown makes a new search request and updates the “DOM.” The time it takes ...
W3Schools
w3schools.com › jsref › jsref_filter.asp
W3Schools.com
The filter() method creates a new array filled with elements that pass a test provided by a function.
GameMaker
manual.gamemaker.io › monthly › en › GameMaker_Language › GML_Reference › Variable_Functions › array_filter.htm
array_filter
This function returns a new array that is the filtered version of the given array (or a range of it).