Just need to find the length of Array in DOC

'''I have a doc, just need to get the length of array in kibana objects,'
'Query:'''
'''
GET .kibana/_search
{
"query": {"match": {
"_id" : "dashboard:Dashboard1"
}}
}
'''
Query results:

'''
{
"_index" : ".kibana_1",
"_type" : "_doc",
"_id" : "dashboard:Dashboard1",
"_score" : 3.0726933,
"_source" : {
"dashboard" : {
"description" : "",
"hits" : 0,
"kibanaSavedObjectMeta" : {
"searchSourceJSON" : """{"filter":,"highlightAll":true,"version":true,"query":{"language":"kuery","query":""}}"""
},
"type" : "dashboard",
"references" : [
{
"id" : "G0",
"name" : "panel_0",
"type" : "visualization"
},
{
"id" : "G1",
"name" : "panel_1",
"type" : "visualization"
},
{
"id" : "G2",
"name" : "panel_2",
"type" : "visualization"
},
{
"id" : "G3",
"name" : "panel_3",
"type" : "visualization"
},
{
"id" : "G4",
"name" : "panel_4",
"type" : "visualization"
},
{
"id" : "G5",
"name" : "panel_5",
"type" : "visualization"
},
{
"id" : "G6",
"name" : "panel_6",
"type" : "visualization"
}
],
"migrationVersion" : {
"dashboard" : "7.3.0"
},
"updated_at" : "2020-09-17T11:15:31.317Z"
}
}
'''
......

Just need to find "references" array length and search inside the each array value.

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