title: Escape hyphen in fields for logstash
body: <p>I have a problem with logstash parsing, I need to extract a field separated by hyphen:</p>
  
  <pre><code>if "[payload][text][code][session-id]" {
    mutate {
      add_field =&gt; { "session-id" =&gt; "%{[payload][text][code][session-id]}" }
    }
  }
  </code></pre>
  
  <p>the conditional is working because the quotes, but when I run the filter, it returns:</p>
  
  <pre><code>t session-id: %{[payload][text][code][session-id]}
  </code></pre>
  
  <p>and what I expect is:</p>
  
  <pre><code>t session-id: HK5wfPQgzkKHmgzVF
  </code></pre>
  
  <p>how I can scape the hypens in the payload field?</p>