Let's say I have var name = {} and on my html page I have elements with the classes, once you click on one element it opens more elements and I want to store those IDs. However, I want to store it as a nested array. For example, click on the element(I select the class) and then opens more elements and I select different elements(I record each ID)
name[class]=[idOfTheElement];
So the question is how can I have a hierarchy like name[class]= and then more than one idOfTheElement