PeterGort

JSON Number value (empty) = zero ?

Discussion created by PeterGort on Aug 20, 2018
Latest reply on Aug 21, 2018 by fmpdude

OK, deep philosophical debate:

 

let(

someJSONobject = JSONSetElement ( "" ; "aNumber" ; aNumberField ; JSONNumber )

;

JSONGetElement ( someJSONobject ; "aNumber" )

)

 

if the field "aNumberField" has a value in it, the result of the above calculation will be that value. All good.  If the field "aNumberField" has no value in it, the result of the above calculation will NOT be empty, it will be zero.  I'm not sure that this is correct behaviour, there are instances where I want to know if the value is zero or absent.  People's thoughts?

Outcomes