Bridge - Filter an Array Object by a Particular Field
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)
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 136 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 485 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives