I want to create the following data-structure with js:
folders dictionary: folder-id(guid) : ==> pages dictionary
pages array: page-position(int) : ==> files dictionary
files dictionary: file-id(guid) : ==> file object
I want to know at each time how many items are in each collection.
How would you suggest me to implemet this in JS ?
Should I use array or object with dynamically added properties?
Do the classes as follows.
It gives you a more rigid and OOP approach.
Edit
This ensures that your keys are unique, gives you count at any time and accepts integers and
strings as keys.