I'm trying to exhaustively put a property on an object that comes from a request (JSON), but I'm not getting it, it's like it just does not get it, but when I do a console.log, there it is, but it's not returning in the reply I send to the postman.
request(url, function (error, response, body) {
let result = JSON.parse(body);
result['teste'] = 'teste';
res.status(200).send(result);
});
Without the property it returns me like this:
[
{
"prop1": "prop1",
"prop2": "prop2",
},
{
"prop1": "prop1",
"prop2": "prop2",
},
]
And I wanted the code to return something like this:
[
{
"prop1": "prop1",
"prop2": "prop2",
},
{
"prop1": "prop1",
"prop2": "prop2",
},
"teste": "teste",
]
How do I stay that way up?