# How to use filebeat fields name value in logstash config

**URL:** <https://discuss.elastic.co/t/how-to-use-filebeat-fields-name-value-in-logstash-config/79791>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [March 23, 2017, 6:02pm UTC](https://discuss.elastic.co/t/how-to-use-filebeat-fields-name-value-in-logstash-config/79791 "2017-03-23T18:02:47Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Jayanna\_Hallur](https://avatars.discourse-cdn.com/v4/letter/j/a4c791/32.png) [@Jayanna\_Hallur](https://discuss.elastic.co/u/Jayanna_Hallur)\
**Post date:** [March 28, 2017, 4:40pm UTC](https://discuss.elastic.co/t/how-to-use-filebeat-fields-name-value-in-logstash-config/79791/3 "2017-03-28T16:40:24Z")

</div>

Thanks for the reply.. But I need to put in filter as highlighted above.. When I put in the filter section, it didn't work.

But if work for if condition in the filter section..it works fine.. but not when I used it assign  
e.g:  
if [fields][index] == "abc" { #### ==\> Works  
"[@metadata][index]" =\> "[fields][index]" ===\> This is not working..  
}

---

_[View the full topic](https://discuss.elastic.co/t/how-to-use-filebeat-fields-name-value-in-logstash-config/79791)._
