I am receiving json encoded data from a web service. However some of the data fields in the json encoded table are not always included. So after I “http.jsondecode( — web service response —)” I receive my data table, which I then wanted to check if a particular data field exists using the table.getdelegate() method.
So tried this and was expecting to receive a null response if the data field is not present, but I got this error message instead “Internal Server Error: the index ‘###’ does not exist”.
I was using the following code to check if it was present:
if (myDataTable.getdelegate(newDataField)) { // exists so can do something with the newDataField } else { // the newDataField does not exist }
I suspect I am doing something silly.