It's been very easy with DataWeave in Apex to convert a JSON to a csv. However, I'm getting a JSON from a REST call, and the part I'm interested in is located in the "data" property, something like that (simplified):
{
"current_page": 1,
"data": [
{
"id": 2854701,
"person": "6116"
},
{
"id": 2854702,
"person": "6116"
}
]
}
Do I have a way to only use the content of the data property for the DataWeave transformation ? I guess I could create an Apex class to parse everything, keep only the data part and parse it again to csv but I would like to avoid that.