# Json input

**URL:** https://discuss.elastic.co/t/json-input/77389
**Category:** Kibana
**Created:** [March 4, 2017, 4:38pm UTC](https://discuss.elastic.co/t/json-input/77389 "2017-03-04T16:38:33Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![avivc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/avivc/32/16501_2.png) [@avivc](https://discuss.elastic.co/u/avivc)
#### Post date: [March 4, 2017, 4:38pm UTC](https://discuss.elastic.co/t/json-input/77389/1 "2017-03-04T16:38:33Z")

</div>

Hi,  
I have a field from type float in my document. I want to filter in my aggregation data using json input.  
when running `GET my_index/ _search`, I'm getting this:

> "kpi": {  
> "mappings": {  
> "Defect": {  
> "PlanEstimate": {  
> "full\_name": "PlanEstimate",  
> "mapping": {  
> "PlanEstimate": {  
> "type": "float"  
> }  
> }  
> }  
> },  
> "HierarchicalRequirement": {  
> "PlanEstimate": {  
> "full\_name": "PlanEstimate",  
> "mapping": {  
> "PlanEstimate": {  
> "type": "float"  
> }  
> }  
> }  
> }  
> }  
> }  
> }

I've tried to create the next json input query, both in my viz and in script field:

> "query": {"script": {"script": "doc['PlanEstimate'].value"}}}

I read all the tutorial that ES has to offer ([Painless](https://www.elastic.co/guide/en/elasticsearch/reference/5.2/modules-scripting-painless.html#_accessing_doc_values_from_painless), [Script field](https://www.elastic.co/guide/en/elasticsearch/reference/5.2/search-request-script-fields.html#search-request-script-fields), [How to use script](https://www.elastic.co/guide/en/elasticsearch/reference/5.2/modules-scripting-using.html#modules-scripting-using), [Metric](https://www.elastic.co/guide/en/kibana/current/metric-chart.html)) but I can't filter what I wish in my viz/ dashboard.  
**BTW - running this query in dev tool return data**

Any idea ?  
Tnx

---

<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 1, 2017, 4:38pm UTC](https://discuss.elastic.co/t/json-input/77389/2 "2017-04-01T16:38:41Z")

</div>

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