How to use filebeat fields name value in logstash config

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..
}