find
returns all rows that match the criterion, or only the first one
array|object find(function criterion, [boolean first] );
criterion | function | the criterion to match |
first | boolean | optional, if true, only the first found result is returned. False by default. |
array|object | an array of found rows or a row object if the 2nd parameter is set to true |
Example
// finds all rows which title match the given value
table.find(function(obj){
return obj.title.toLowerCase().indexOf(value) != -1;
});
Related samples
See also
Back to top