Mastering Immutable.js
上QQ阅读APP看书,第一时间看更新

Filtering Collections and Finding Items

Filtering collections is the most common operation performed with Immutable.js collections. Filters get us the parts of the collection that matter: the data that's relevant for the task at hand. There are only a handful of collection methods that are relevant to filtering collections and finding specific values, each of which can be used in many ways to get us the data that we need. In this chapter, you'll learn about the following:

  • The basics of filtering Immutable.js collections
  • Filtering maps based on their keys
  • Finding specific collection values
  • How deep equality in Immutable.js works
  • Performing partial matches when searching
  • Changing the search direction