# Reference field dynamically from another event

**URL:** https://discuss.elastic.co/t/reference-field-dynamically-from-another-event/153639
**Category:** Logstash
**Created:** [October 23, 2018, 3:13pm UTC](https://discuss.elastic.co/t/reference-field-dynamically-from-another-event/153639 "2018-10-23T15:13:58Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![IC91](https://avatars.discourse-cdn.com/v4/letter/i/b5e925/32.png) [@IC91](https://discuss.elastic.co/u/IC91)
#### Post date: [October 23, 2018, 3:13pm UTC](https://discuss.elastic.co/t/reference-field-dynamically-from-another-event/153639/1 "2018-10-23T15:13:59Z")

</div>

So I am using Http poller input plugin to poll two different URLs,

So I am trying to add a new field in the second URL response(JSON) as from first URL event response:

`

> add\_field =\> {"[CountyOutageInfo][0][StateName]" =\> "%{[StateOutageInfo][0][StateName]}"}

`

where "%{[StateOutageInfo][0][StateName]}" is the data referenced from first URL event response

So the value added for this case is simply "%{[StateOutageInfo][0][StateName]}" and not the state name. Am i missing something ?

My system is Red Hat 4.8.5, logstash version is 6.4.2.

---

<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 20, 2018, 3:14pm UTC](https://discuss.elastic.co/t/reference-field-dynamically-from-another-event/153639/2 "2018-11-20T15:14:00Z")

</div>

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