# XPATH for JSON Documents

**URL:** https://discuss.elastic.co/t/xpath-for-json-documents/60642
**Category:** Logstash
**Created:** [September 15, 2016, 8:03pm UTC](https://discuss.elastic.co/t/xpath-for-json-documents/60642 "2016-09-15T20:03:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Johnnycc1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/johnnycc1/32/26069_2.png) [@Johnnycc1](https://discuss.elastic.co/u/Johnnycc1)
#### Post date: [September 15, 2016, 8:03pm UTC](https://discuss.elastic.co/t/xpath-for-json-documents/60642/1 "2016-09-15T20:03:47Z")

</div>

Easy questions.

Where data comes into logstash as XML, I can use xpath in the XML filter to pull out specific information from the XML structure and store it in a new field.

Is there a way to do this when the document coming into logstash is JSON ?

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [September 16, 2016, 5:32am UTC](https://discuss.elastic.co/t/xpath-for-json-documents/60642/2 "2016-09-16T05:32:53Z")

</div>

No, because XPath applies to XML and XML and JSON are different things. However, Logstash could be made to support [JSON Pointer](https://tools.ietf.org/html/rfc6901) which is similar to XPath. What do you want to do, exactly?

---

<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: [July 6, 2017, 4:38am UTC](https://discuss.elastic.co/t/xpath-for-json-documents/60642/3 "2017-07-06T04:38:13Z")

</div>


