I use MongoDB Realm 3rd Party services as webhooks and can't manage to parse incoming data to normal JSON, instead it automatically parses to JSON 'strict' format giving some variables types.
exports = function(payload, response) {
var data = JSON.parse(payload.body.text());
return data
};
e.g. with payload:
{
"key": 0,
"text": "AlphaZero"
}
parsing data from BSON changes it into:
{
"key": {
"$numberDouble": "0"
},
"text": "AlphaZero"
}
How do I deal with it?