Search within nested json data

How do i search within nested json without knowing the mapping.
I can do the search using this.

	{
"query": {
	    "match" : {
    	     "doc.Header.To": "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"
	    }
    }
}

But how to do search with just the key(To) without using(doc.Header.To)
and just get the content of key rather than the whole document.

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