What is the best method for filtering a JavaScript array of objects based on a specific key-value pair?
For example: I am interested in selecting items by their color from the array below:
[{Id:1, color:"blue"},{Id:2, color:"green"},{Id:3, color:"blue"},{Id:4, color:"red"}]
While it is simple to select items by property in languages like CSS or xslt, I am struggling to find an equivalent method for JSON.