Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
JSON. stringify( ) function in JavaScript
The stringify() function of a JSON object accepts a JSON string, and constructs an object based on the given text and, returns it.
Syntax
Its Syntax is as follows
Json.stringify();
Example
<html>
<head>
<title>JavaScript Example</title>
</head>
<body>
<script type="text/javascript">
var jsonSample = '{Tutorial: Java, Version:8}';
jsonObj = JSON.stringify(jsonSample);
document.write(jsonObj);
</script>
</body>
</html>
Output
"{Tutorial: Java, Version:8}"Advertisements