Created
April 27, 2019 04:50
-
-
Save Fenil265/4c52a169f05f87f8a7b86dd853128db9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var jsonSearch = function(json_array,needle){ | |
return json_array.map(function(d) { return d[Object.keys(needle)[0]]; }).indexOf(needle[Object.keys(needle)[0]]) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment