I have a restAPI response with lots of lovely nested Arrays like the example below.
"synopses": [
{
"source": {
"id": "321",
"value": "ProviderX"
},
"locked": false,
"descriptions": [
{
"lang": "en",
"value": "Only ten men can solve the mystery of the murdered French football coach and retrieve the priceless Pink Panther diamond.",
"length": "LONG"
},
{
"lang": "en",
"value": "Only ten men can solve the mystery of the murdered French football coach.",
"length": "SHORT"
}
]
}
],
{
"source": {
"id": "123",
"value": "ProviderY"
},
"locked": false,
"descriptions": [
{
"lang": "en",
"value": "Only one man can solve the mystery of the murdered French football coach and retrieve the priceless Pink Panther diamond.",
"length": "LONG"
},
{
"lang": "en",
"value": "Only one man can solve the mystery of the murdered French football coach.",
"length": "SHORT"
}
]
}
]
}
Ultimately I'd like to have a table of the $.synopses[*].description fields for each of the values of $.synopses[*].source.value.
I can reference the first synopses with a query JSON with SQL query like so, but how can I filter on $.synopses[*].source.value for each of the tables? Is there a where clause syntax that allows me to move back up the JSON path?
select * from
{{query1.data.synopses[0].descriptions}}
Are you looking to have multiple rows for each of the synopses.values (one for each of the descriptions), or have many description columns for each synopses.value?
I previously used this format (arr->key) to pull out values from an array within my query but recently it stopped pulling the data through correctly
These are the steps that I'm following:
I have a MongoDB query that returns the following sample data as an example, lets assume there is a string column called companyName and a json columns called 'list_admin' which has the below format
Super strange that it stopped working. If you check the State tab in the left panel, is the query.data property the same as before (an array of objects)?
Also, if you’re just trying to return an array of the emails, you should be able to do this with some JS, like:
{{ formatDataAsObject(getCompanies.data).email }}
Or if you want to return it in a data structure that the table component accepts (array of objects or object of arrays), you can do:
Hey @Trying! How would you like your custom column to look? Where is your custom column data coming from? Are you trying to show just the size property, for example?