Created
February 14, 2018 14:29
-
-
Save glenndevenish/763a9b1b80abe0b056f499721131df9e to your computer and use it in GitHub Desktop.
Use an input with id of 'search' to filter array 'arr' - matches space-separated words
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arr.filter(arr => arr.name.match(new RegExp($("#search").val().replace(/ /g, "|"), "i"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment