I have a json input :
{"@version":"1","@timestamp":"2018-03-19T18:24:01.919Z","fields":"{\"numdocksavailable\":0,\"is_installed\":0,\"is_returning\":0,\"is_renting\":0,\"last_reported\":1519703208,\"station_id\":66505513,\"numbikesavailable\":0}"}
{"@version":"1","@timestamp":"2018-03-19T18:24:01.919Z","fields":"{\"numdocksavailable\":0,\"is_installed\":0,\"is_returning\":0,\"is_renting\":0,\"last_reported\":1519703208,\"station_id\":66505511,\"numbikesavailable\":0}"}
...
I want to add at root the field fields.station_id
The code bellow does not work:
filter { mutate { add_field => { "station_id" => "%{[fields][station_id]}"} } }
Actually it create a field station_id
with value literrally without interpretion of value
"station_id":"%{[fields][station_id]}"
Please, could you help me to improve my selector?