Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const object = {
- p1: 'Hello World',
- p2: 3,
- p3: true,
- }
- const json_object = JSON.stringify(object);
- /* output ->
- "{"p1":"Hello World","p2":3,"p3":true}"
- */
- JSON.parse(json_object);
- /* output ->
- {
- p1: 'Hello World',
- p2: 3,
- p3: true,
- }
- */
Add Comment
Please, Sign In to add comment