Skip to content

Instantly share code, notes, and snippets.

@lmzach09
Last active July 27, 2019 04:23
Show Gist options
  • Save lmzach09/ccfb5a620537350ac2a29e445d746921 to your computer and use it in GitHub Desktop.
Save lmzach09/ccfb5a620537350ac2a29e445d746921 to your computer and use it in GitHub Desktop.
Parsing a JSON string to JavaScript object example
let str = '{ "a": 123 }';
let obj = JSON.parse(str);
console.log(obj);
// { a: 123 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment