Created
May 11, 2017 15:51
-
-
Save xuyuji9000/3ce504d28f93f77a0f78f480e88f5f83 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
let _ = require('lodash') | |
let thing = [ | |
{"a": 123}, | |
{"a": 456}, | |
{"abc": 6789}, | |
] | |
console.log(typeof(thing)) | |
let result = _.filter(thing, function(element){ | |
return element.a==123 | |
}) | |
console.log(result) | |
console.log(_.head(result)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment