Created
October 1, 2018 19:12
-
-
Save bjruberg/ce6b0e5cbf7f05eeff7cb17e98233e1f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// native | |
array.map(item => item.field) | |
array.filter(item => item.value === 1) | |
array.sort(item => item.value) | |
// lodash's shorter variants | |
_.map(array, "field") | |
_.filter(array, { value: 1 }) | |
_.sort(array, "value") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment