doubletake
Posts: 0
Joined: Sat May 25, 2013 5:55 pm

localstorage.getitem('myLocalJSONArrayofObjects')

I have a JSON result (Array of Objects), which is a list of venues that comes back in my search results from FourSquare API. I store the venues in localStorage so that I can access them on another screen.

How "Should" I be storing and getting JSON Array of Objects so that I can loop through it with $.each?

var myvenuedata = localstorage.getitem('myLocalJSON')

$.each(myvenuedata, function(index, value) {
alert(lat: ' + value.location.lat);
});

Or is there a better approach to storing and accessing data on multiple screens?

Thanks,
Don

Image

doubletake
Posts: 0
Joined: Sat May 25, 2013 5:55 pm

localstorage.getitem('myLocalJSONArrayofObjects')

I think I found an answer about using stringify first at very bottom of this page
http://docs.appery.io/documentation/a...

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

localstorage.getitem('myLocalJSONArrayofObjects')

Hi Don,

Yes, you're right. Just to add. In localStorage you can store a string only.

Return to “Issues”