Skip to main content
Stack Overflow
  1. About
  2. For Teams

Timeline for Best way to convert string to array of object in javascript?

Current License: CC BY-SA 2.5

14 events
when toggle format what by license comment
Mar 27, 2014 at 15:43 vote accept Zeck
Jun 6, 2012 at 4:48 history edited Community Bot CC BY-SA 3.0
http://www.json.org/json2.js was remapped to https://github.com/douglascrockford/JSON-js/blob/master/json2.js by Jarrod Dixon (3)
Sep 3, 2010 at 9:47 history bounty awarded Community Bot
Sep 2, 2010 at 15:52 history edited Steven Sudit CC BY-SA 2.5
deleted 1 characters in body
Sep 2, 2010 at 10:50 history edited alcuadrado CC BY-SA 2.5
Expan json2.js explanation
Sep 1, 2010 at 23:07 history edited alcuadrado CC BY-SA 2.5
fix error
Aug 31, 2010 at 20:41 comment added Russ Cam Note that json2 still uses eval, but performs some checks to mitigate potential vulnerabilities
Aug 31, 2010 at 16:05 comment added alcuadrado eval() parses a string as JavaScript source, and as all valid JSON is also valid JavaScript (and it comes from JavaScript Object Notation), you can use eval() to transform it to it's JavaScript representation. It's a common practice to add parents at the beginning and end of the string for security reasons, although using eval() stills pretty insecure. So, var myObject = eval( "(" + myString + ")" ); is just parsing the myString JSON and getting it's value in myObject variable (probably an object or array)
Aug 31, 2010 at 15:33 comment added MEM What does var myObject = eval( "(" + myString + ")" ); mean? Thanks a lot.
Aug 27, 2010 at 18:35 history edited alcuadrado CC BY-SA 2.5
correct something about keys quoting
Aug 27, 2010 at 9:59 history edited alcuadrado CC BY-SA 2.5
added 189 characters in body
Aug 27, 2010 at 9:53 history edited alcuadrado CC BY-SA 2.5
added 298 characters in body
Aug 27, 2010 at 9:46 history edited alcuadrado CC BY-SA 2.5
got the safari version
Aug 27, 2010 at 9:40 history answered alcuadrado CC BY-SA 2.5

AltStyle によって変換されたページ (->オリジナル) /