Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // we'll call this "reduce ...spread"
- let result = items.reduce((acc, item) => ({
- ...acc, [item.name]: item.value
- }), {})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement