I am using the JSON filter to parse some JSON data and create fields. This results in fields with names such as details.order.price and details.order.qty. I am trying to convert these fields into float but it is not working. Does anyone know how to do this?
I am trying:
convert => [ "details.order.price", "float" ]
convert => [ "details.order.qty", "float" ]
I also tried the following:
convert => [ "details", "float" ]
convert => [ "price", "float" ]
Thanks
@cschotke did you try this (http://logstash.net/docs/1.4.2/configuration#fieldreferences)
convert => [ "[details][order][price]", "float" ]
convert => [ "[details][order][qty]", "float" ]
That worked. Thank you!
For anyone finding this through Google, the updated URL for the relevant reference page is https://www.elastic.co/guide/en/logstash/current/event-dependent-configuration.html#logstash-config-field-references
Most helpful comment
For anyone finding this through Google, the updated URL for the relevant reference page is https://www.elastic.co/guide/en/logstash/current/event-dependent-configuration.html#logstash-config-field-references