How to get counts of array item in KQL?

Is there any way to count how many item in the items field ? In the following case is 3.
I would like to filter docs with more than one item within items. Thanks.

{
"grocery_name": "Elastic Eats",
"items": [
{
"name": "peach",
"stock": "10"
},
{
"name": "carrot",
"stock": "9"
},
{
"name": "broccoli",
"stock": "5"
}
]
}

Other than using a scripted field to count it, or by adding a field that has the size at ingest. Other than that, there is no way of doing it in Kibana.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.