How to convert an object to json in Node.js?

How to convert general JavaScript objects to json in Node.js?

asked Oct 16, 2015 by anonymous

1 Answer

Assume jo is a JavaScript object, you can convert it to a json string by:

JSON.stringify(jo)
answered Oct 16, 2015 by Eric Z Ma (44,280 points)

Please log in or register to answer this question.

Related questions

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...