I have an array of objects and a unique id. I'd like to search through the array of objects for the object instance that matches the unique id, but I'm not sure how to begin to approach it.
idToSearchfor = 2
arrayToBeSearched = [{content: 'string', id: 1}, {content: 'string', id: 2}, {content: 'string', id: 3}]