Good Afternoon
I have called a JSON Result with an array of vallues:
{"User_Details":{"columns":["ID","Name","Surname","Email"],"records":[[1,"Name1","Surname1","mail1@email.com"],[3,"Name2","Surname2","Mail2@email.com.com"]]}}
When it's a single value it's easy to add to my fields because the structure of the json is simple and I can get the values direct:
{"ID":1,"Name":"Name1","Surname":"Surname1","Email":"mail1@email.com"}
I cannot get the multiple result to my table - I have created a structure:
STMyRecords is structure
ID is int
Name is string
Surname is string
Email is string
END
STUserDetails is structure
arrRecords is array of string
END
And this is my code:
myrequest is string
bufBuf is Buffer
stMyDetails is STUserDetails
myrequest = HTTPRequest("https://getthejasonresponsehere/")
bufBuf = HTTPGetResult()
Deserialize(stMyDetails,bufBuf,psdJSON)
I have tried so many scenarios and don't know where to go with this. I am using Windev Mobile 21 so there is no JSONtoVariant option.
Please can someone help me with the code.
Regards
Ruan