title: How do I test to see if a variable exists in a ColdFusion struct?
body: <p>I would like to test:</p>
  
  <pre><code>&lt;cfif Exists(MyStruct["mittens"])&gt;
  &lt;/cfif&gt;
  </code></pre>
  
  <p>If the "mittens" key doesn't exist in MyStruct, what will it return? 0, or ""??</p>
  
  <p>What should replace Exists function?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I tried, </p>
  
  <pre><code>&lt;cfif IsDefined(MyStruct.mittens)&gt;
  </code></pre>
  
  <p>Which also throws the error</p>
  
  <blockquote>
    <p>Element Mittens is undefined in MyStruct.</p>
  </blockquote>