I’m trying to convert a Buffer to JSON object. I’ve tried a lot of measures so far. but it doesn’t seem to work.
Here’s my buffer:
<Buffer 7b 22 6d 65 73 73 61 67 65 73 22 3a 5b 5d 2c 2.... 4972 more bytes>
Steps I’ve tried:
console.log('Object1', JSON.stringify(request.response.body));
output: {“type”:”Buffer”,”data”:[]}
console.log('test2.....', JSON.parse(request.response.body));
JSON.parse() is not logging any output, even after waiting for long.
How do I convert this to a readable JS object?