3

Is it possible convert string from JSON.stringify back to Array?

sein
  • 159
  • 1
  • 2
  • 11

1 Answers1

22

JSON.parse is your friend and answer :)

//examples:
JSON.parse('{}'); // {}
JSON.parse('true'); // true
JSON.parse('"foo"'); // "foo"
JSON.parse('[1, 5, "false"]'); // [1, 5, "false"]
JSON.parse('null'); // null

MDN JSON.Parse details

Dory Zidon
  • 10,497
  • 2
  • 25
  • 39