I thought this is a cloudflare problem because i've gotten the answer from stackoverflow

can anyone help with this? i’m surprised it does not work on cloudflare after seeing the solution on stackoverflow.

if (obj[“h”] !== undefined){ //crashes here if “h” is not found. how to resolve? it doesnt seem to work for boolean detection of “undefined”

iValue =
{“u":“demouser”,“e”:"[email protected]”,“h”:“12345”} //ok

BUT {“u":“demouser”,“e”:"[email protected]”} //ok

obj = JSON.parse(iValue)

if (obj[“h”] !== undefined){ //crashes here if “h” is not found. how to resolve?

}

A post was merged into an existing topic: (obj[“h”] !== undefined) not working?