I have two lists as below. How can I combine the elements in the list within themselves?
var cars = [
{"id" : 1, "title" : "BMW"},
{"id" : 2, "title" : "Toyota"}
];
var attr = [{"hp" : 250}, {"hp" : 130}];
How can I get it to print out this way?
[{"id": 1, "title": BMW", "hp": 250}, {"id": 2, "title": "Toyota", "hp": 130}]
