While the current code functions well for a single record, I am seeking to adapt it to handle an array containing approximately 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)
The resulting output is:
Object {aaa_id: 123, abbr_name: "j_doe", name: "john doe", bbb_id: 789}
Shown below is the JSON format for the remaining 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 suggestions on how to modify this function to accommodate these arrays? Your assistance is greatly appreciated!