- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Why do we use JSON.stringify() method in jQuery?
JSON or JavaScript Object Notation is a lightweight text-based open standard designed for human-readable data interchange. Use the JSON.stringify() method to convert a JavaScript object into a string.
You can try to run the following code to learn how to work with JSON.stringify() method −
Example
<!DOCTYPE html> <html> <body> <p id="test"></p> <p>JSON string is created above</p> <script> var v = { "name":"Amit", "Rank":1, "city":"India"}; var newJSON = JSON.stringify(v); document.getElementById("test").innerHTML = newJSON; </script> </body> </html>
- Related Articles
- Why do we use jQuery over JavaScript?
- Where do we use $.extend() method in jQuery?
- JSON. stringify( ) function in JavaScript
- Why do we use re.compile() method in Python regular expression?
- How do we use # in jQuery Attribute Selector?
- How do we use jQuery selector eq:()?
- Why do we use "use strict" in JavaScript?
- Why do we use random.seed() in Python?
- Why do we use interfaces in Java?
- Why do we use pandas in python?
- Why do we use brackets in BODMAS?
- Why do we Use JavaScript in HTML?
- How do we use .not() with jQuery selector?
- Why do we use Convex Mirrors ?
- Where do we use jQuery.noConflict() method?

Advertisements