ok i see.. you didnt directly answer, but Im assuming then I can map multiple items to one local storage variable which inside i write whatever is needed to save them all and get them individually...
ok i see.. you didnt directly answer, but Im assuming then I can map multiple items to one local storage variable which inside i write whatever is needed to save them all and get them individually...
You can but you will overwrite the previous value (if one exists). You need to build an API on top of the standard API to do that.
i guess it depends what you mean by overwriting the previous data. If I send one service response with 10 different items, cant i map them all in one local storage item and inside write a JS to list all the items im mapping in it so that later i can retrieve just one by writing a filtering code?
And yes, if the same service response continues to come in then it would only be natural im overwriting the data in there. Thats the point
You can do that with JavaScript but not with mapping. The way mapping works, every response item will overwrite the previous one and you will end up with the last one set.
You could map a collection to a JavaScript variable - and there get all the values and save them.