JavaScript parsing boolean
<p>in the response from my server I get a JSON object. It has a boolean flag.</p>

<pre><code>if(file.showInTable == 'true') {

} 
</code></pre>

<p>But, even if <code>showInTable</code> is set to <code>false</code>, I get inside that code block. How to cope with that ?</p>

<p>I tried:</p>

<pre><code>if(file.showInTable == 'true')
if(file.showInTable)
if(Boolean(file.showInTable))
</code></pre>

<h2>Edit</h2>

<p>as Ghommey has mentioned, I've used the 2nd option to check that value. Even if the comparions statement returns <code>false</code>, it also gets inside the code. See the pic below</p>

<p><img src="http://i.stack.imgur.com/VsxCa.png" alt="enter image description here"></p>
