I created mongo database as data service in Integration Studio. I want to call a query from Mongo and read its result as Json. I am trying below method but data is coming as null. I want to read the data returned by Mongo in json format. Can you help with this ?
The Code for Integration Studio Data service xml:
Data returned by MongoDb Query:
[
{
"_id": {
"id": "1234",
"type": "test"
}
}
]
CodePudding user response:
Update your output mappings to the following.
{
"Documents": {
"Document": [
{
"id": "$document._id.id",
"name": "$document._id.type"
}
]
}
}