I have an object:
var obj = { "stuff": "stuff" }
In Express, I send it the client like so:
res.json(obj);
Is there a way to configure the response object to automatically add attributes to the json it generates? For example, to output:
{
"status": "ok",
"data": { "stuff": "stuff" }
}
Thanks!