Hi,
I’m having a little trouble parsing the result from an API into a XOJO Desktop app (Windows). I have attached the ‘template’ of how the JSON is structured and my attempt at the corresponding XOJO code.
You will see that the test for the existence of the key ‘poolDividends’ succeeds, so why does the subsequent attempt result in a KeyNotFoundException ?
For me, these 2 tests are sufficient to establish its existence:
[code]if dividend.HasKey(“poolDividends”) then
if dividend.Value(“poolDividends”) <> nil then[/code]
Must be something I’m missing ?
Thanks in advance,
Steve