How can I add: "headers": { time: new Date().getTime() }
to a Javscript object:
{
"1": 3.7,
"2": 0.5,
"3": 1.0,
"4": 60,
"5": 180,
}
So the resulting object is (for example):
{
"1": 3.7,
"2": 0.5,
"3": 1.0,
"4": 60,
"5": 180,
"headers": { "time" : 1234 },
}
If I use push
I get a “Uncaught SyntaxError: Unexpected token o”
and I'm unsure of how to wrap the headers if I use object notation to add.