Do you know we can send JSON object to the client side ?
And we mostly use JSON data to pass client side.
We’ll do it using res.end()
We need to create a server first. You can see it from day 12.
Now we can create an JSON object
Now change the Content-Type
We can send the data to frontend now using res.end(JSONObject)
JSON.stringify()
A common use of JSON is to exchange data to/from a web server.
Called server using postman –
Can you send JSON data using node js now ?