I am trying to achieve something complex in the TX REST connector using table flattening.
I have the following JSON response:
[
{
"id": 1,
"submitted": "2024-06-26T12:11:42+02:00",
"answers": [
{
"question": {
"id": 3,
"label": "How do you evaluate this?",
"type": "SINGLE"
},
"answer": 9
},
{
"question": {
"id": 4,
"label": "How do you rate the following elements?",
"type": "MATRIX_SINGLE_CHOICE"
},
"answer": [
{
"ids": [
55
],
"labels": [
"Drinks"
],
"value": [
"Good"
]
},
{
"ids": [
56
],
"labels": [
"Food"
],
"value": [
"Good"
]
}
]
}
]
}
]
So my response has an answers array which contains both a question array and an answer that is sometimes a direct value and sometimes an array. How can I create a flattening that directly reads a parent node without expanding the child nodes (ids, lables,value)?