I need to create a dictionary of lists. Is that possible in Javascript? I am looking for something that will let me add objects for a feature/subfeature pairs and also iterate the feature/subfeature collections. My feature/subfeature data is a series of integer pairs:
[1,2], [1,3], [1,23], [2,4], [2, 12], ....
where the 1st number is the feature index, and the second number is the subfeature index. Each of these pairs can have a list of objects. I want to iterate the list by feature index and them by objects. Something like
forEach( item where feature index == someIndex, function(foo) {
forEach (item[someindex, foo.index] , function(bar) {
display bar.prop1, bar.prop2, ....
I will making a database call and add the results as items to this structure.
This structure is emulating something I put together in .Net using a dictionary that used a tuple as a key and list of objects as the value. The declaration was :
Dictionary <tuple[], list<myobject>>
Thanks,
Jerry