# How to use JSON Input on split series by terms

**URL:** <https://discuss.elastic.co/t/how-to-use-json-input-on-split-series-by-terms/122667>\
**Category:** Kibana\
**Created:** [March 6, 2018, 8:24am UTC](https://discuss.elastic.co/t/how-to-use-json-input-on-split-series-by-terms/122667 "2018-03-06T08:24:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![slavik57](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/slavik57/32/22870_2.png) [@slavik57](https://discuss.elastic.co/u/slavik57)\
**Post date:** [March 6, 2018, 8:24am UTC](https://discuss.elastic.co/t/how-to-use-json-input-on-split-series-by-terms/122667/1 "2018-03-06T08:24:13Z")

</div>

I have a bar chart visualization and I split the bars by terms on a string field.  
Every value of that string field has the same prefix, I would like to remove it using the JSON input.  
I already use the JSON input on the Y-Axis like so:

```auto
{
  "script": {
    "inline": "doc['measurement.executionTimeMsec'].value / 1000",
    "lang": "painless"
  }
}

```

I tried doing something similar there but it doesn't work, even simply presenting the value doesn't work:

```auto
{
  "script": {
    "inline": "doc['measurement.query'].value",
    "lang": "painless"
  }
}

```

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [March 7, 2018, 5:22pm UTC](https://discuss.elastic.co/t/how-to-use-json-input-on-split-series-by-terms/122667/2 "2018-03-07T17:22:40Z")

</div>

hi @slavik57,

I'd use the scripted-field functionality of Kibana. It does the same thing, but it gets bootstrapped for you.

See here for info:

[https://www.elastic.co/guide/en/kibana/current/scripted-fields.html](https://www.elastic.co/guide/en/kibana/current/scripted-fields.html)

You create the field and then it is available for display in Discovery or Visualize.

---

<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 4, 2018, 5:22pm UTC](https://discuss.elastic.co/t/how-to-use-json-input-on-split-series-by-terms/122667/3 "2018-04-04T17:22:52Z")

</div>

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