I want to send response as a dictionary like this:
{
"id": 5928101,
"category": "animal welfare",
"organizer": "Adam",
"title": "Cat Cabaret",
"description": "Yay felines!",
"location": "Meow Town",
"date": "2019-01-03T21:54:00.000Z",
"time": "2:00",
}
But I am using bellow code, which results an array
var ress = JSON.stringify(sqlResults)
console.log('response json:' + ress)
res.send(ress)
The resulted array has brackets [] like this:
[
{
"id": 5928101,
"category": "animal welfare",
"organizer": "Adam",
"title": "Cat Cabaret",
"description": "Yay felines!",
"location": "Meow Town",
"date": "2019-01-03T21:54:00.000Z",
"time": "2:00",
}
]
How can I send result without a third bracket?