Join Two Arrays by ID
Index the first array’s objects by id in a hash map, then merge each second-array object into the entry with the same id.
Index the first array’s objects by id in a hash map, then merge each second-array object into the entry with the same id.