# Search json field

**URL:** <https://discuss.elastic.co/t/search-json-field/228864>\
**Category:** Elasticsearch\
**Created:** [April 20, 2020, 12:41pm UTC](https://discuss.elastic.co/t/search-json-field/228864 "2020-04-20T12:41:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rhh](https://avatars.discourse-cdn.com/v4/letter/r/e9a140/32.png) [@Rhh](https://discuss.elastic.co/u/Rhh)\
**Post date:** [April 20, 2020, 12:41pm UTC](https://discuss.elastic.co/t/search-json-field/228864/1 "2020-04-20T12:41:11Z")

</div>

How can i search a field containing a json string with Nest/C# ? The filed is called 'message'

I would like to get all hits where Data.VehicleID = 2

"{"Message":"1 forsøk","Data":{"User":{"DriverID":"0","VehicleID":"2","CentralCode":""},"Booking":{"ID":"0","Text":""},"Sequence":"0","FareAmount":"0","TipsAmount":"0","ExtraAmount":"0","CurrencySymbol":"","Transaction1":"","Transaction2":"","TransactionData":"","MerchantID":"","TerminalID":"","ID":"","Provider":"TPH","Phone":"","Timestamp":"0","Status":"INITIATED","Result":"PENDING"},"Exception":{"Type":"DivideByZeroException","Message":"Forsøkte å dele med null.","Stack":[{"Method":"yy","File":"Form1.cs","Line":"71","Column":"13"},{"Method":"xx","File":"Form1.cs","Line":"65","Column":"13"},{"Method":".ctor","File":"Form1.cs","Line":"40","Column":"17"}]},"System":{"Process":{"Id":33332,"Name":"WindowsFormsApp11"},"Thread":{"Id":1,"Name":"trilili","Culture":"nb-NO"}}"

Regards

---

<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 18, 2020, 12:41pm UTC](https://discuss.elastic.co/t/search-json-field/228864/2 "2020-05-18T12:41:19Z")

</div>

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