Convert an object into a JSON object
JSON.parse() didn't work for a Bluebird promise object.
$ npm install --save object-to-json
var objectToJson = require("object-to-json");
var person = {
name: "Joe",
age: 22
}
var jsonPerson = objectToJSON(person);
Name | Type | Description |
---|---|---|
object | Object |
object to be converted to a JSON object |
var objectToJson = require("object-to-json");
var person = {
name: "Joe",
age: 22
}
var jsonPerson = objectToJSON(person);
MIT © Joe Gesualdo