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)
-
@jokano1 , I am trying to do something very similar. How did you make this work?
Thank you,
Neil
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.9K Get Help
- 429 Global Discussions
- 147 Industry Talk
- 487 Announcements
- 5.2K Ideas & Feature Requests
- 86 Brandfolder
- 151 Just for fun
- 74 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 305 Events
- 36 Webinars
- 7.3K Forum Archives