I wish to create a fairly complex schedule editor and I need to store the data retreived from the backend somehow (i'll get that with ajax, but thats not the question). The schedule should have monday-friday and then a set of locations, all identical for each day. So there'll exist some parent div and then child divs for each day. This should be click+drag editable and click + Modal editable. Therefore I believe I need to store this data somehow, since querying the DOM each edit would be absolute hell.
Local storage would be nice for this, except i'd have to Stringify/JSON encode my objects (since a localStorage and sessionStorage are essentially a Map<String, String>, and I dont expect this to be efficient or manageable for the 'size' of the object.
I expect the object to have
(1) array of days
(2) array of locations (sub columns in each day [recall identical across days])
A day would have an array of Intervals,
An interval would have a (most likely) bitmasked start time and finish time, a name, a name or index mapping to its location column ([recall identical across any day]), and some other simple attributes.
I suppose I could also just have a single array of intervals and make the dayId an attribute of the interval.
In either case, I dont expect JSON to 'easily' handle this, though its doable. Should I use a simple IndexedDB instead to help with managing the data and relations? I'm not sure if it would be overkill, or i'm looking in the wrong area entirely