I have a real time feed of names entering a JS function and I would like to create an object such as:
var renderObj= {
{"name": "test1", "size": 3938},
{"name": "test2", "size": 3812},
{"name": "test3", "size": 6714}
};
So renderObj is empty to start. Each time a name comes in, I need to check if it exists in the object. If it does, update the size.
Can anyone advise?