Articles → JavaScript → JSON.Stringify Function In Javascript
JSON.Stringify Function In Javascript
Purpose
Syntax
JSON.stringify(javascript_object);
Example
<!DOCTYPE html>
<html>
<head>
<title></title>
<script>
var person= {};
person.Name = "gyan";
var string = JSON.stringify(person);
document.write(string);
</script>
</head>
<body>
</body>
</html>
Output