I want to make a structure like this:
var myThings = {
thing1: {
['24-04-12', '90'],
['25-04-12', '90'],
['26-04-12', '90']
},
thing2: {
['24-04-12', '10'],
['25-04-12', '30'],
['26-04-12', '210']
}
}
(There are 4 things, hardcoded).
The arrays in each object will be added in a loop, so my code looks like this:
var myThings = {"thing1":{}, "thing2":{}};
I then can't work out how to push my arrays into the object.
Am I being dumb, or is this not the way to do this?
Thanks a lot!