in the response from my server I get a JSON object. It has a boolean flag.
if(file.showInTable == 'true') {
}
But, even if showInTable
is set to false
, I get inside that code block. How to cope with that ?
I tried:
if(file.showInTable == 'true')
if(file.showInTable)
if(Boolean(file.showInTable))
Edit
as Ghommey has mentioned, I've used the 2nd option to check that value. Even if the comparions statement returns false
, it also gets inside the code. See the pic below