# JsonPath in Logstash plugin

**URL:** <https://discuss.elastic.co/t/jsonpath-in-logstash-plugin/171947>\
**Category:** Logstash\
**Created:** [March 12, 2019, 12:22pm UTC](https://discuss.elastic.co/t/jsonpath-in-logstash-plugin/171947 "2019-03-12T12:22:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arko](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@Arko](https://discuss.elastic.co/u/Arko)\
**Post date:** [March 12, 2019, 12:22pm UTC](https://discuss.elastic.co/t/jsonpath-in-logstash-plugin/171947/1 "2019-03-12T12:22:34Z")

</div>

I there any option to parse **JSON** with **JsonPath** - similar like **XML filter plugin** with **xpath**?

In **Json filter plugin** I don't see such option but it would be very helpfull i.e parsing all parameters of objects array.

Example - let's say that on one field I have json message:

```
{
  "firstName": "John",
  "lastName" : "doe",
  "age" : 26,
  "address" : {
    "streetAddress": "naist street",
    "city" : "Nara",
    "postalCode" : "630-0192"
  },
  "phoneNumbers": [
    {
      "type" : "iPhone",
      "number": "0123-4567-8888"
    },
    {
      "type" : "home",
      "number": "0123-4567-8910"
    }
  ]
}

```

with jsonPath = **$.phoneNumbers[:].type** I would extract new field: **parsed-types =\> "iPhone, home"**

---

<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:** [April 9, 2019, 12:22pm UTC](https://discuss.elastic.co/t/jsonpath-in-logstash-plugin/171947/2 "2019-04-09T12:22:34Z")

</div>

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