KevRead
Posts: 0
Joined: Sun Apr 22, 2012 8:38 am

Saving the entire JSON response to local storage

How can I save the whole JSON response BLOB into a single local storage variable.

Any hints?

I assume it will be some JS in the Success event but hwo can I access the response BLOB?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Saving the entire JSON response to local storage

One way is during service to page mapping. Take the root of the response structure and save it into local storage in JavaScript function: Something like this:

code
var r = JSON.stringify(value);
localStorage('key', r);
/code

http://help.gotiggr.com/documentation...

As you suggested you can use service's success event as well: http://help.gotiggr.com/documentation...

It shows how to handle errors but you would handle any other logic using success event in the same fashion.

Jason Baird
Posts: 0
Joined: Tue Nov 26, 2013 11:38 pm

Saving the entire JSON response to local storage

Hmmm, I found this link and did it, but it seems to only be storing one response although I put the code in the js area that is mapped from $

Return to “Issues”