Forum Post: RE: Storing values in dataset

  • Thread starter Thread starter mflanegan
  • Start date Start date
Status
Not open for further replies.
M

mflanegan

Guest
I’m trying to store my JSDO into a local storage variable for use later in my app, this function is just a test to see if i can store it, retrieve it and later append to it: function jsdoTest() { var jsdo = WebService_beBasicSearch_JSDO.jsdo; var testObject = JSON.stringify(jsdo); // Put the object into storage localStorage.setItem('testObject', testObject); // Retrieve the object from storage var retrievedObject = localStorage.getItem('testObject'); console.log('retrievedObject: ', JSON.parse(retrievedObject)); } I’m getting the following error: Uncaught TypeError: Converting circular structure to JSON. what am i doing wrong? Meyrick Flanegan Developer - Managed Services Email: mflanegan@elcb.co.za ELCB Information Services (Pty) Ltd Customer Service Email elcb@elcb.co.za · www.elcb.co.za E A S T L O N D O N Tel: +27(43) 704 0700 Fax: +27(43) 704 0701 J O H A N N E S B U R G Tel: +27(11) 879 6179 Fax: +27(11) 454 0384 P O R T E L I Z A B E T H Tel: +27(41) 373 0529 Fax: +27(86) 650 0135 Disclaimer From: Santosh Patel [mailto:bounce-sapatel@community.progress.com] Sent: 11 December 2014 09:49 AM To: TU.Mobile@community.progress.com Subject: RE: [Technical Users - Mobile] Storing values in dataset RE: Storing values in dataset Reply by Santosh Patel How about using localStorage? See here www.w3schools.com/.../html5_webstorage.asp for more info. You can use the localStorage object to store any json object, in this case your shopping cart. Stop receiving emails on this subject. Flag this post as spam/abuse.

Continue reading...
 
Status
Not open for further replies.
Back
Top