# Mapping json in http plugin

**URL:** https://discuss.elastic.co/t/mapping-json-in-http-plugin/151384
**Category:** Logstash
**Created:** [October 8, 2018, 4:55am UTC](https://discuss.elastic.co/t/mapping-json-in-http-plugin/151384 "2018-10-08T04:55:36Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![robindeshwal](https://avatars.discourse-cdn.com/v4/letter/r/9dc877/32.png) [@robindeshwal](https://discuss.elastic.co/u/robindeshwal)
#### Post date: [October 8, 2018, 4:55am UTC](https://discuss.elastic.co/t/mapping-json-in-http-plugin/151384/1 "2018-10-08T04:55:36Z")

</div>

Hi,

Ii am using http output plugin to send data to my api's.

i am using mapping for map data and post data, here:  
mapping =\> {"foo" =\> "%{host}"  
"bar" =\> "%{type}"}

But i want to send below type of data:  
mapping =\> {"foo" =\> "%{host}"  
"bar" =\> {"foo" =\> %{type}, "bar" =\> %{host}}  
}

But i can't do this, please help me to send this type of to my api url.

Thank you

---

<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, 2018, 4:55am UTC](https://discuss.elastic.co/t/mapping-json-in-http-plugin/151384/2 "2018-11-05T04:55:40Z")

</div>

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