This express middleware is born for prettifing request and reponse json.
Each key from request body and query will change format to camelcase. And send response back with snakecase.
- If we want json's keys in snakecase.
{
"some_prop": "value"
}
- We want to use camelcase in javascript code.
const object = {
someProp: 'value',
};
Then you should use this middleware.
npm install express-humps --save
import humps from 'express-humps';
app.use(humps());