I am passing a CFC a JSON, and there is a key that may or may not exist. So, I am checking it with isDefined
, but for whatever reason, coldfusion doesn't think it exists, when, from what I'm seeing it clearly does. I have tried everything I can think of, but now I'm at a loss for what the problem is.
Here is the JSON pulled from Firebug:
[{"type":"USEQUIT","date":"01/01/2011"}] //the date, may or may not exist
Here is the only important part of the CFC function:
<cfargument name="attribs">
//debugging code
<cfif isDefined("attribs.date")>
<cfdump var="date here">
<cfelse>
<cfdump var="date not here">
</cfif>
I do this above in other function, and it works fine, but for whatever reason, I cannot get it to work here. I'm assuming that I'm doing something wrong, but I cannot figure it out, so I'm asking the community.
Any thoughts?