I’m attempting to create a graph that processes an HTTP JSON response and outputs only the data needed while retaining the orignial data structure.
I’m fine until I get to nested elements.
Sample structure:
{
"tickets":[
{
"url": "https://xxxxx.zendesk.com/api/v2/tickets/#####.json",
"id": ########,
"external_id": null,
"custom_fields":[
{
"id": ###########,
"value": "Foo"
},
{
"id": ###########,
"value": "Bar"
}
],
....
}
]
}
How, can read the http resposne and output a “tickets” object with the following structure?
{
"tickets":[
{
"id": ########,
"custom_fields":[
{
"id": ###########,
"value": "Foo"
}
],
....
}
]
}
My goal for this process is to retain only one or two specific custom_field values. The same would go for other elements where I only need to retain certain values in in the data set.
The ultimate goal is to only provide the data required for the use case as much of the data contains PII which we need to exclude.
I’m able to generate a JSON file that contains anything within the first level of the tickets array, but I’m struggling with how to handle nested arrays such as “custom_fields”.
Thanks in advance!