# Kibana multiple line scripts json input

**URL:** <https://discuss.elastic.co/t/kibana-multiple-line-scripts-json-input/248374>\
**Category:** Kibana\
**Created:** [September 11, 2020, 6:54pm UTC](https://discuss.elastic.co/t/kibana-multiple-line-scripts-json-input/248374 "2020-09-11T18:54:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sambart19](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@sambart19](https://discuss.elastic.co/u/sambart19)\
**Post date:** [September 11, 2020, 6:54pm UTC](https://discuss.elastic.co/t/kibana-multiple-line-scripts-json-input/248374/1 "2020-09-11T18:54:31Z")

</div>

This is a duplicate of the question [here](https://discuss.elastic.co/t/multi-line-scripts-in-kibanas-json-input/232198) from a different user that never got an answer.

I would like to be able to use multiple lines in the json input for a script but the triple quote that is listed in documentation doesn't seem to work. There is more information in the post linked above, but that is the general question.

---

<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:** [September 14, 2020, 10:27am UTC](https://discuss.elastic.co/t/kibana-multiple-line-scripts-json-input/248374/2 "2020-09-14T10:27:59Z")

</div>

Hello,

You can escape double quotes with `\` if you have other quotes, but for multiline I don't think there i a way currently and I am thinking this is a bug.  
Can you point me to the docs where you found the triple quotes for the kibana input so that can be fixed until the bug is fixed?

---

<div class="post-metadata">

**Author:** ![sambart19](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@sambart19](https://discuss.elastic.co/u/sambart19)\
**Post date:** [September 14, 2020, 4:18pm UTC](https://discuss.elastic.co/t/kibana-multiple-line-scripts-json-input/248374/3 "2020-09-14T16:18:09Z")

</div>

Yeah escaping quotes isn't an issue, its just really gross to have to write a script in one line. Thanks for looking at this.

[Here](https://www.elastic.co/guide/en/kibana/current/supported-aggregations.html#visualize-metric-aggregations) is the kibana documentation mentioning of using the JSON input for scripting at the end of this linked passage. This then links to elasticsearch documentation about scripting in general. After a couple more links you can find an example of multiline painless scripting [here.](https://www.elastic.co/guide/en/elasticsearch/painless/7.9/painless-walkthrough.html#_accessing_doc_values_from_painless)

---

<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:** [September 15, 2020, 1:09pm UTC](https://discuss.elastic.co/t/kibana-multiple-line-scripts-json-input/248374/4 "2020-09-15T13:09:07Z")

</div>

I can imagine. This looks like a bug to me. Could you open one in the Kibana repo here? [https://github.com/elastic/kibana/issues](https://github.com/elastic/kibana/issues)

---

<div class="post-metadata">

**Author:** ![geo909](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/geo909/32/65605_2.png) [@geo909](https://discuss.elastic.co/u/geo909)\
**Post date:** [October 8, 2020, 7:21am UTC](https://discuss.elastic.co/t/kibana-multiple-line-scripts-json-input/248374/5 "2020-10-08T07:21:38Z")

</div>

The user who never got an answer thanks you for ressurecting this 🙂

---

<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:** [November 5, 2020, 7:22am UTC](https://discuss.elastic.co/t/kibana-multiple-line-scripts-json-input/248374/6 "2020-11-05T07:22:03Z")

</div>

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