Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

null condition check is not working in javascript

I have added one condition in JS. If one value in the incoming request payload coming as null then it will set a flow variable's value in that variable. But that condition for null checking is not working.

It is returning 500 error.

var jPayload = JSON.parse(getPayload);

if(jPayload.systemId)

{

var systemId= jPayload.systemId;

if((jPayload.systemId === "0") || (jPayload.systemId === " ") || (jPayload.systemId === null))

{ systemId = var1;

}else

{ systemId= systemId;

}

}

Note: systemId is a key in incoming json payload.

0 10 2,013
10 REPLIES 10