Skip to main content Accessibility Feedback

JSON

JSON.parse()

Converts stringified JSON back into an object or array.

// Get data from local storage
var savedLunch = JSON.parse(localStorage.getItem('lunchOrder'));
var savedDrinks = JSON.parse(localStorage.getItem('drinkOptions'));

Works back to IE8.