I'm requesting data using oracledb npm trying to get a JSON formatted response
here is an example of select block I'm using :
const block =
'BEGIN ' +
':response := PK.getData(:param);' +
'END;';
const result = await connection.execute(block, bindVars);
res.status(200).send(result);
{ "metadata":[{"client":"name"...
res.status(200).json(result);
"{ \"metadata\":[{\"client\":\"name\"...
You need to do JSON.parse
on your response, because you can send only string
as response from server
Edit:
Add Content-Type: application/json
header so it will be auto parsed in Postman
res.header('Content-Type' , 'application/json');