I have defined a variable in a javascript, but while getting that variable in the next policy and comparing it, it is giving wrong result.
I have set a variable named extractvar in java script which is the first policy in my apiproxy. the next policy is validate apikey which has to be run/skipped w.r.t. this variable “extractvar”.
But in trace when check, I can see two variable with the same name, but the second one is with a curly bracket at the end.
extractvar
extractvar}
And the validate apikey policy is checking the second variable and giving a wrong result.
condition in proxy–
VerifyAPIKey
{extractvar}=0
tracing result—
expression (apikeyvalue} equals 0)
expressionResult false
Can someone tell me why this second variable is coming.