title: Logstash config: check if boolean field exists
body: <p>Using Logstash 1.4.2, I have a field <code>myfield</code> that is a boolean value in my JSON document.</p>
  
  <p>To check if it exists (don't care about the boolean value) I used:</p>
  
  <pre><code>if[myfield] { ...exists... } else { ...doesn't exist... } 
  </code></pre>
  
  <p>The results from testing this conditional statement are:</p>
  
  <pre><code>[myfield] does not exist   --&gt; false
  [myfield] exists, is true  --&gt; true
  [myfield] exists, is false --&gt; false //expected true because the field exists
  </code></pre>
  
  <p>It is checking the boolean value, not its <strong>existence</strong>.</p>
  
  <p><strong>How can I check that a boolean field exists?</strong></p>