Skip to content

Instantly share code, notes, and snippets.

@tai2
Created October 19, 2016 10:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tai2/35f0b33b3cc9c49d917522e830529f7f to your computer and use it in GitHub Desktop.
Save tai2/35f0b33b3cc9c49d917522e830529f7f to your computer and use it in GitHub Desktop.
a.reduce((prev, curr) => (prev[curr.id] = curr, prev), {});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment