vendredi 27 février 2015

How to print object data in Javascript using sessionStorage concepts in HTML5

I am framing a JSON object in Script tag in HTML screen -


var passingElements = {"options":{"axisY":{"title":"Cups","titleFontSize":15,"labelFontColor":"#000000","labelFontSize":"10"},"axisX":{"labelFontColor":"#000000","labelFontSize":"10","gridColor":"orange"},"toolTip":{"enabled":false}, "data":[{"type":"column","indexLabel":"{x}","indexLabelFontColor":"#000000","dataPoints":[{y: 0.07, label:'3:09 A'},{y: 0.01, label:'1:58 A'},]}]}}


We have saved the JSON object to sessionStorage as sessionStorage.setItem("sessiondata", passingElements);


When we are trying to retrieve the stored data as sessionStorage.getItem("sessiondata"); // Printing as "[object Object]"


Please let me know how can i view the data or use the data which is stored in session storages.


We are working on Titanium Appcelerator tool.


Thanks, Rakesh Kalwa.


Aucun commentaire:

Enregistrer un commentaire