I am looking to store the following data structure:
TIMESTAMP | NAME | COUNTS
For each time stamp, there can be multiple names, and each name has a list of counts:
123456 | EXAMPLE1 | 1,2,3,4
| EXAMPLE2 | 4,3,2,1
| EXAMPLE3 | 9,7,4,3
I would like to store the timestamp as an object index so that I can access it when I know the timestamp. This also eliminates any issues with array size limits and defining etc.
What I dont know is how to create a list of "names" for each timestamp, and for each name I would like to store a list of counts.
Can anyone advise how I can create this data structure and access all counts for a specific timestamp and name?
So far I have this:
dataObj[timestamp] = new Array(name,[count]);
But i have 2 questions:
1) How would I test to see if I already have the name?
2) How would I add another name array?
Appreciate any comments.
Regards, Ben.