I did cheat a bit when I created this. I dumped in data that was really null… IE:
Set variable {null} = $response.result[x].est_date.quarter
which will usually be stored as
Then I removed that “Set variable
” line of code, and simply referred back to the null variable
with ‘nothing’ stored in it. (comparing to null can be tricky, but this technique works well for me)
Another way to say this:
In webCoRE’s eyes, neither a blank variable
, nor typing “null”, is the same as a true null.
I often use this trick when I program, but this may be my first time sharing it publicly…
I was hoping it transferred when importing… but I should know better… Unset variables
remain unset…
I guess the final version should force in an endpoint that is always null, to initialize that variable
.
(although I hate leaving in code that only needs to run once per lifetime… and of course, how can I be sure that a certain endpoint will always be null?)
Hmmm…
Untested, but I wonder if creating a totally bogus endpoint would create an effective null.
IE:
$response.result[x].bananaSplits
will likely never exist in the real API…
Edit:
Nope, the test failed. It has to be a real endpoint with no data for null to be stored properly.
Edit 2:
Dang it… Now I am craving a Banana Split!