# Search for nested field in json

**URL:** <https://discuss.elastic.co/t/search-for-nested-field-in-json/165427>\
**Category:** Elasticsearch\
**Created:** [January 23, 2019, 2:39pm UTC](https://discuss.elastic.co/t/search-for-nested-field-in-json/165427 "2019-01-23T14:39:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![itsron143](https://avatars.discourse-cdn.com/v4/letter/i/a6a055/32.png) [@itsron143](https://discuss.elastic.co/u/itsron143)\
**Post date:** [January 23, 2019, 2:39pm UTC](https://discuss.elastic.co/t/search-for-nested-field-in-json/165427/1 "2019-01-23T14:39:23Z")

</div>

I have an index which has documents in [this](https://jsoneditoronline.org/?id=fb3cbcfd2cb84281b19a30b6684e5b8a) form of nested json. I want to search for values of the field `LeftText` in the mentioned link using a bool must match. How do I write the query? (ES 5.6)

---

<div class="post-metadata">

**Author:** ![ramchjob](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ramchjob/32/31480_2.png) [@ramchjob](https://discuss.elastic.co/u/ramchjob)\
**Post date:** [January 23, 2019, 4:19pm UTC](https://discuss.elastic.co/t/search-for-nested-field-in-json/165427/2 "2019-01-23T16:19:15Z")

</div>

This link should help you write the query.

[https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-nested-query.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-nested-query.html)

---

<div class="post-metadata">

**Author:** ![itsron143](https://avatars.discourse-cdn.com/v4/letter/i/a6a055/32.png) [@itsron143](https://discuss.elastic.co/u/itsron143)\
**Post date:** [January 24, 2019, 4:09am UTC](https://discuss.elastic.co/t/search-for-nested-field-in-json/165427/3 "2019-01-24T04:09:29Z")

</div>

I tried using this but was unable to form the query. Can you write a query to search for keys of `LeftText` in the above `json` link?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 21, 2019, 4:09am UTC](https://discuss.elastic.co/t/search-for-nested-field-in-json/165427/4 "2019-02-21T04:09:33Z")

</div>

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