Forum Discussion
tstack
6 years agoFormer Employee
I think the GroupByN snap will do what you want. If you set the “Group Size” to zero, it will collect all of the input documents.
Another approach would be to use the expression language. You could call the filter() method on the array with a callback function that checks the condition. For example, if you wanted to filter the array by the state
property, you could do something like this:
$allLocations.location.filter(elem => elem.state == "US-TX")
- travis_pendleto6 years agoNew Contributor II
Thanks! I’ll give that a try!