Parse stream to object in Nodejs
I had to parse the JSON after converting to string:
var fileContents = data.Body.toString();
var json = JSON.parse(fileContents);
console.log(json);
Have you tried data.Body.toString()
?
I had to parse the JSON after converting to string:
var fileContents = data.Body.toString();
var json = JSON.parse(fileContents);
console.log(json);
Have you tried data.Body.toString()
?