Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <h2>Convert a JavaScript object into a JSON string, and send it to the server.</h2> <script> const myObj = { name: "John", age: 31, city: "New York" }; const myJSON = JSON.stringify(myObj); window.location = "demo_json.php?x=" + myJSON; </script> </body> </html>