i am consuming one API and the resopnse is weird i...
# cfml-beginners
g
i am consuming one API and the resopnse is weird i am getting undefined in the struct struct actualRunway : undefined i am looping over a struct and if i add a check using isDefined, it says syntactically invalid call to isDefined,. if i compare the value to undefined, i am still getting an error
Copy code
<cfloop collection="#arrival#" item="idx">
<cfif isDefined('arrival[idx]') and arrival[idx] neq 'undefined'>
a
What do you think "syntactically invalid" might mean in this context? Did you look @ the docs for
isDefined
to see if it cast any light on that error message?
a
@gsr, did you fix your issue? The problem might be because you need to use
StructKeyExists()
instead of
isDefined()
for an evaluation of
arrival[idx]
ah, nvm, i see you replied below. sorry about that!