Summary

This chapter introduced you to the map/reduce programming model and how Lo-Dash tools can help to realize it in your application. First, we examined mapping collections, including how to choose which properties get included and how to perform calculations. We then moved on to mapping objects. Keys have an important role in how objects get mapped to new objects and collections. There are also methods and functions to consider when mapping.

The second part of the chapter covered reducing, including how to sum items, how to transform objects, and how to formulate generic callback functions that can be used in a variety of contexts. The chapter closed with a brief look at what chaining map/reduce operations together looks like.

Map/reduce is ...

Get Lo-Dash Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.