Joins in Javascript
问题 I have 2 lists of objects: people = [{id: 1, name: "Tom", carid: 1}, {id: 2, name: "Bob", carid: 1}, {id: 3, name: "Sir Benjamin Rogan-Josh IV", carid: 2}]; cars= [{id: 1, name: "Ford Fiesta", color: "blue"}, {id: 2, name: "Ferrari", color: "red"}, {id: 3, name: "Rover 25", color: "Sunset Melting Yellow with hints of yellow"}]; Is there a function (possibly in Angular, JQuery, Underscore, LoDash, or other external library) to do a left join in one line on these? Something like: peoplewithcars