How to extract body in Express.js

When I receive an object through POST, req.body looks like:

{ '{\n  "attrs" : {\n    "name" : "myName",\n    "books" : ': { '\n      {\n        "attrs" : {\n ...  

How can I get the request to turn it into JSON?

You most likely need to set the Content-Type of your request as application/json. For example, if you're using cURL, this means setting -H "Content-Type: application/json".