Advertisement
Guest User

Untitled

a guest
Jun 21st, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const myObject = { a: 'hello', b: 5, c: true, d: [1, 2, 3], e: { f: {} } };
  2. const myObjectJson = JSON.stringify(myObject);
  3.  
  4. console.log('myObject: ', myObject);
  5. console.log('myObjectJson: ', myObjectJson);
  6.  
  7. const myObjectParsed = JSON.parse(myObjectJson);
  8.  
  9. console.log('myObjectParsed: ', myObjectParsed);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement