Need to get all the columns with the same name

I need to get all the "progName"for a given institute below is sample data
in my ES

"programs":[
{
"totBachelorsProgs":"10",
"subs":[
{
"totBachelorsProgs":"7",
"subs":[
{
"totBachelorsProgs":"7",
"subs":[

                 ],
                 "totAssociateProgs":"-",
                 "progName":"Drawing"
              }
           ],
           "totAssociateProgs":"-",
           "progName":"Fine Arts"
        },
        {
           "totBachelorsProgs":"3",
           "subs":[
              {
                 "totBachelorsProgs":"3",
                 "subs":[

                 ],
                 "totAssociateProgs":"-",
                 "progName":"Music History and Literature"
              }
           ],
           "totAssociateProgs":"-",
           "progName":"Music"
        }
     ],
     "totAssociateProgs":"-",
     "progName":"Arts"
  },
  {
     "totBachelorsProgs":"39",
     "subs":[
        {
           "totBachelorsProgs":"39",
           "subs":[
              {
                 "totBachelorsProgs":"39",
                 "subs":[

                 ],
                 "totAssociateProgs":"-",
                 "progName":"Biology and Biological Sciences"
              }
           ],
           "totAssociateProgs":"-",
           "progName":"Biology"
        }
     ],
     "totAssociateProgs":"-",
     "progName":"Biological Sciences"
  }

]

the below works when i know the object structure

{
"query": {
"match": {
"progName": "Architecture"
}
},
"partial_fields": {
"partial1": {
"include": [
"programs.progName",
"programs.subs.progName",
"programs.subs.subs.progName",
]
}
}
}

but if one more "subs" section comes up in the data i have to change the
query. is there i way to get all the field with the same name.without
traversing into the structure.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.