Is there any way to convert javascript object into JSON.
I can not use
JSON.stringify(<obj>)
Because there is no stringify method in the JSON object in the following link.
Example:
var obj = {'x':1,'y':2}
Now if I'll run
console.log(JSON.stringify(obj));
Then I'm getting this error.
error: TypeError: Object # has no method 'stringify'
Well, the website overrides the actual JSON object with their own.
> JSON
> Object {toStr: function, quote: function}
Try using JSON.toStr(object)