This code works fine for one record, but I'm trying to make it work with an array of ~500 records...
var aaa = {
aaa_id: 123,
abbr_name: "j_doe",
name: "john doe"
}
var bbb = {
bbb_id: 789,
}
for (var attrname in bbb) {
aaa[attrname] = bbb[attrname];
}
console.log(aaa.aaa_id)
This outputs:
Object {aaa_id: 123, abbr_name: "j_doe", name: "john doe", bbb_id: 789}
Here's what my JSON looks like for the other records:
var aaaRecords [ {
"first_name": "Hasheem",
"last_name": "Thabeet",
"aaa_player_id": "4562"
},
...
]
var bbbRecords [{
"first_name": "Hasheem",
"last_name": "Thabeet",
"aaa_player_id": "4562"
},
....
]
Any ideas on how to make this function work with these arrays? Thanks a lot for any help!
