Find All using nested arrays

Options

Hi. I'm working with an interesting problem. I have arrays that are nested and need to search the main arrays based on values in the nested ones. Here's an example from the Xano Documentation

[
{
"id": 4,
"created_at": 1632268901955,
"make": "honda",
"model": "civic",
"year": 2002,
"maintenance": [
{
"year": 2004,
"description": "New bumper"
},
{
"year": 2009,
"description": "Radiator"
}
]
},
{
"id": 1,
"created_at": 1632268899571,
"make": "toyota",
"model": "corolla",
"year": 1998,
"maintenance": [
{
"year": 2015,
"description": "New engine"
},
{
"year": 2008,
"description": "Transmission"
}
]
},
{
"id": 2,
"created_at": 1632268900442,
"make": "jeep",
"model": "wrangler",
"year": 2007,
"maintenance": [
{
"year": 2016,
"description": "Suspension"
}
]
},
{
"id": 3,
"created_at": 1632268901252,
"make": "ford",
"model": "4 runner",
"year": 2004,
"maintenance": [
{
"year": 2011,
"description": "Radiator"
},
{
"year": 2013,
"description": "Passenger door"
}
]
}
]

If I want to search for records that have maintenance of Radiator, I should get back 2 records.

Using dot notation, it's as though the nested array is not visible, or I'm using the wrong technique to filter the records.

Help!

Comments