- Underscore.JS Tutorial
- Underscore.JS - Home
- Underscore.JS - Overview
- Underscore.JS - Environment Setup
- Underscore.JS - Iterating Collection
- Underscore.JS - Processing Collection
- Underscore.JS - Iterating Array
- Underscore.JS - Processing Array
- Underscore.JS - Functions
- Underscore.JS - Mapping Objects
- Underscore.JS - Updating Objects
- Underscore.JS - Comparing Objects
- Underscore.JS - Utilities
- Underscore.JS - Chaining
- Underscore.JS Useful Resources
- Underscore.JS - Quick Guide
- Underscore.JS - Useful Resources
- Underscore.JS - Discussion
Underscore.JS - Mapping Objects
Underscore.JS has many easy to use methods which helps in mapping objects. This chapter discusses them in detail.
Underscore.JS provides various methods to handle object mapping as listed below −
Sr.No. | Method & Syntax |
---|---|
1 | keys
_.keys(object) |
2 | allKeys
_.allKeys(object) |
3 | values
_.values(object) |
4 | mapObject
_.mapObject(object, iteratee, [context]) |
5 | pairs
_.pairs(object) |
6 | invert
_.invert(object) |
7 | create
_.create(prototype, props) |
8 | functions
_.functions(object) |
9 | findKey
_.findKey(object, predicate, [context]) |
Advertisements
To Continue Learning Please Login
Login with Google