Q:

Find substring in a array using jquery

Is there a way to find a substring in an array using jquery without iterating through all the elements?
I have an array
arr = ["tree","bird"];

without iterating through all the elements, can i pop the element having "ird" substring?

A:

If the issue is performance as its a large array containing data back from 1930, unless you are doing something like an autocomplete (which will require a re-search everytime the user types a char), your biggest problem will be data-transfer rather than client-side processing.
Either way, if it's a big bunch of data, don't send to the client. Implement a service that will do the calculation, retrieve and send the result back to you.
On server-side (or if you are really obsessive about implementing in client-side), if performance is poor while iterating through the array (or selecting the database?), your best bet is a Trie-like data structure (it is the most common way of implementing substring search for scenarios like auto-complete).

