# Slashes in a JSON field - can't visualize on sub-fields

**URL:** <https://discuss.elastic.co/t/slashes-in-a-json-field-cant-visualize-on-sub-fields/144893>\
**Category:** Kibana\
**Created:** [August 17, 2018, 11:59am UTC](https://discuss.elastic.co/t/slashes-in-a-json-field-cant-visualize-on-sub-fields/144893 "2018-08-17T11:59:37Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![azasypkin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/azasypkin/32/42216_2.png) [@azasypkin](https://discuss.elastic.co/u/azasypkin)\
**Post date:** [August 17, 2018, 12:23pm UTC](https://discuss.elastic.co/t/slashes-in-a-json-field-cant-visualize-on-sub-fields/144893/2 "2018-08-17T12:23:30Z")

</div>

Hi @Patryk_Miszczak,

As suggested [here](https://discuss.elastic.co/t/painless-scripting-json-functions/98511/2?u=azasypkin), you'd better properly re-ingest your data so that `log` field is indexed as an object, not as a string.

If it's something out of your control and you need to extract just some fraction of the data from `log` field you can create a scripted field and use [Painless API](https://www.elastic.co/guide/en/elasticsearch/painless/6.3/painless-api-reference.html) to extract the data you need. Painless doesn't support any specific JSON functionality, but you can use `String` functions like `indexOf` and `substring` to extract pieces you're interested in.

Thanks,  
Oleg

---

_[View the full topic](https://discuss.elastic.co/t/slashes-in-a-json-field-cant-visualize-on-sub-fields/144893)._
