SyntaxFix
Write A Post
Hire A Developer
Questions
You need to stringify the json, not calling toString
toString
var buf = Buffer.from(JSON.stringify(obj));
And for converting string to json obj :
var temp = JSON.parse(buf.toString());