Please help !!! problems with multiple JSON-VBA in MS Access 2019/365
rwiedemannn opened this issue · 3 comments
Hi,
I use MS ACCESS and simple responses work perfectly.
the VBA-JSON is a great tool, but actually i have a problem to parse items from following json response, if the JSON response is multi-level:
{"orderStatus":{"tourGuid":"fc8578f9-2c29-41d2-bbea-363070d33949","orderGuid":"7da1170f-36eb-4fd2-b3c8-4f1666bec0db","orderState":0,"tourArrival":"11:49","eta":null,"formdata":null,"guid":"02928fe7-a8ef-4cac-a7d8-6d5004fb8fa8"},"status":{"code":100,"description":null,"invalidItemKeys":null}}
Does anyone have a solution or suggestion for me?
I need the items "orderState" and "tourArrival".....
Many many thanks to the community here !
Best from Rene
Many thanks for the answer. I managed to do it myself today with this code and it works perfectly! Big thanks again!
_Dim JsonORDERstatus As Dictionary
Set JsonORDERstatus = JsonConverter.ParseJson(requestStringORDER.ResponseText)
Me!Text13 = requestStringORDER.ResponseText
Me!FO_ARCH_ENDK_DDF_arrival = JsonORDERstatus("orderStatus")("tourArrival")
Me!FO_ARCH_ENDK_DDF_orderstatus = JsonORDERstatus("orderStatus")("orderState")
Me!FO_ARCH_ENDK_DDF_eta = JsonORDERstatus("orderStatus")("eta")
DoCmd.Save_