Page 1 of 1

How to retrieve an Array form Local Storage ??

Posted: Sun Dec 08, 2013 12:59 pm
by tariq

Hi
I Saved items in Array then saved the array on local storage, how can i retrieve special element or group of elements from local storage??


How to retrieve an Array form Local Storage ??

Posted: Sun Dec 08, 2013 3:33 pm
by Illya Stepanov

Hello,

The arrays in JavaScript has several methods for working with elements.

If you are saving objects array in localStorage, you'll need to convert values to a string:
pre
JSON.parse();
JSON.stringify();
/pre

If you are looking for a associative array - hope this article will help you.


How to retrieve an Array form Local Storage ??

Posted: Sun Dec 08, 2013 7:09 pm
by tariq

Thanks Illya, i'll try them on my array.