Bridge - Filter an Array Object by a Particular Field
Options
I have an array of objects that I need to filter and find a particular field in Bridge.
ex. [{name: 1, id: 123}, {name: 2, id: 321}]
In this case, how would I select the id for the "name" key/field whose value is "1"?
Tags:
Answers
-
I ended up using JS to filter the array as follow:
var newArray = dataArray.filter(function (el) {
return el.name == foldername
});
return(newArray)