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
- Smartsheet Customer Resources
- 63.1K Get Help
- 380 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 450 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 289 Events
- 34 Webinars
- 7.3K Forum Archives