Join Joe Marini for an in-depth discussion in this video Searching collections, part of Learning Underscore.js.
Underscore also provides functions for making…searching through data easier as well.…And we're going to look at that in this movie.…So you can see here in my ExampleSnippets file…I've scrolled down to the searching section right here.…And I'm going to open up the searching_start.html file.…And this is what we're going to fill out.…Now you probably see a pattern emerging here, in each one of these example files.…I have already gone ahead and included the underscore JS file and…the sample data.JS file so that you don't have to do it.…
And again, in this case I'm going to be using an event listener…to listen to the load event, in order to excercise the test code.…And once again, I'd have a div down here with an ID of container.…And that's where we're going to put our results.…So back here in the snippets,…let's start off by testing the Find function.…The Underscore Find function finds the first instance…of an element that matches a set of criteria.…So I'm going to copy these three lines right here, I'll…copy that and over in the html file we'll paste that in.…
- Understanding what Underscore.js is and does
- Installing Underscore.js
- Sorting, grouping, and filtering data sets
- Extracting information about arrays and objects
- Using templates to format data