UncleCoder.com

UncleCoder.com

Free programming examples and instructions

convert JSON object to json string - javascript

Demo and code for how to convert JSON object to JSON string in javascript

by Athil


Posted on 27 Jun 2018 Category: Javascript Views: 23

Edited on 13 Jul 2019


Here I am going to show how to convert Javascript array to JSON string.

DEMO

Javascript

            var JSONdata = { "name": "alex","age":"18" };
            datastring =  JSON.stringify(JSONdata);
            alert(datastring);

 



Leave a Comment: