I\'m stuck how i sum two object like this:
obj1 = {
\'over_due_data\': 10,
\'text_data\': 5
}
obj2 = {
\'over_due_data\': 20,
\'text_data\': 5
}
<
Try something like this if you don't want to use loop
obj1 = {
'over_due_data': 10,
'text_data': 5
}
obj2 = {
'over_due_data': 20,
'text_data': 5
}
var obj = {};
obj['over_due_data'] = obj1['over_due_data'] + obj2['over_due_data']
obj['text_data'] = obj1['text_data'] + obj2['text_data']
console.log(obj)