'Underscore.js Grouping Object
is it posible to group object and combine all properties with Underscore.js like this:
[
{ menu: "Setting", role: "admin" },
{ menu: "Setting", role: "user" },
{ menu: "Setting", role: "developer" },
{ menu: "Application", role: "admin" },
{ menu: "Application", role: "user" },
]
into something like this:
[
{ menu: "Setting", admin: "OK", user: "OK", developer: "OK"},
{ menu: "Application", admin: "OK", user: "OK"},
]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
