# How to filter json string field value

**URL:** <https://discuss.elastic.co/t/how-to-filter-json-string-field-value/176391>\
**Category:** Kibana\
**Created:** [April 11, 2019, 11:25am UTC](https://discuss.elastic.co/t/how-to-filter-json-string-field-value/176391 "2019-04-11T11:25:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sonu\_Pajai\_Save](https://avatars.discourse-cdn.com/v4/letter/s/e9bcb4/32.png) [@Sonu\_Pajai\_Save](https://discuss.elastic.co/u/Sonu_Pajai_Save)\
**Post date:** [April 11, 2019, 11:25am UTC](https://discuss.elastic.co/t/how-to-filter-json-string-field-value/176391/1 "2019-04-11T11:25:51Z")

</div>

in my elasticsearch index it has pagedata filed under message field which contains following data

message.PageData:  
{"survey\_details":{"survey\_status":0,"survey\_ref\_id":1,"skip\_status":0,"question\_count":21,"survey\_open\_date":"10-08-2018","survey\_close\_date":"16-11-

pagedata can be string or hash thats why i havent applied filter over page data

i there any way to search survey\_status":0, & "survey\_ref\_id":1, located in json string field

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [April 12, 2019, 1:25pm UTC](https://discuss.elastic.co/t/how-to-filter-json-string-field-value/176391/2 "2019-04-12T13:25:19Z")

</div>

Depending on how it's stored in Elasticsearch it would be pretty hard to figure out a filter for that data. Best option would have been to use nested fields and ingest the whole json separately, having fields like`message.pagedata.surveydetails.survey_status` and so on.

---

<div class="post-metadata">

**Author:** ![Sonu\_Pajai\_Save](https://avatars.discourse-cdn.com/v4/letter/s/e9bcb4/32.png) [@Sonu\_Pajai\_Save](https://discuss.elastic.co/u/Sonu_Pajai_Save)\
**Post date:** [April 16, 2019, 11:23am UTC](https://discuss.elastic.co/t/how-to-filter-json-string-field-value/176391/3 "2019-04-16T11:23:57Z")

</div>

its stored as string, but want to use it like json/hash

---

<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:** [May 14, 2019, 11:24am UTC](https://discuss.elastic.co/t/how-to-filter-json-string-field-value/176391/4 "2019-05-14T11:24:00Z")

</div>

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