You cannot send an object to a web-server, so you have to convert your object to a string. Thus JSON.stringify() comes in action.
Note: String is the only data type to exchange data between a browser and a web-server.
Sending Data From Client-Side to Server-Side
From the client-side, the object has to be converted to a string and send to the web-server. Whereas, In a web-server, you will catch the transmitted string from the client-side and convert it to an object to work with it.
Note: While sending data to a web-server jQuery will automatically convert your object to a string. So, you don't have to convert it explicitly by using JSON.stringify().
In the following example, we will convert an object to a string by using JSON.stringify().