I have an array of event objects called events. Each event has markets, an array containing market objects. Inside here there is another array called outcomes, containing outcome objects.
I want to use Underscore.js or some other method to find all of the events which have markets which have outcomes which have a property named test.
I imagine this would be achieved using a series of filters but I didn't have much luck!
outcometomarketand so on. Because in this case you can just filter all theoutcomeobjects those match your search and go backwards until theevent, then clean up the array for unique elements.