javascript - Convert JS object to JSON string

preview_player
Показать описание
#short
#javascript
#json
#string
#object
If I defined an object in JS with:
var j={"name":"binchen"};

How can I convert the object to JSON? The output string should be:
'{"name":"binchen"}'
Рекомендации по теме