Javascript examples for JSon:JSon Parse
Send object array to Json and parse back to object
<html lang="en"> <head> <title> Morkel King</title> </head> <body translate="no"> <script> const jsObjectArray = [/*w w w . java 2 s .c om*/ {name: "Homer", age:56 }, {name: "Marge", age:50 }, ]; const buf = JSON.stringify(jsObjectArray); console.log("String: "+buf); // convert it back to an object const newObject = JSON.parse(buf); console.log("object: "+newObject); </script> </body> </html>