I’m looking to extract a subsection of a javascript array of objects based on a certain condition, e.g:
object.property == 2
I know that I could look through and build a new array from the ones that match, but I was wondering whether there was a shorthand for this.
You can use grep().