I'm a little bit closer to the solution, but I have another challenge.
This is the code that I now have:
But because the JSON doesn't have the "key" only the ROOT I get error here:Code:cJS.InitScriptEngine Set JsonObject = cJS.DecodeJsonString(CStr(result)) Set JsonObject = cJS.GetObjectProperty(JsonObject, "ROOT") Keys = cJS.GetKeys(JsonObject) ' svi kljuèevi iz Json stringa For lRow = 1 To UBound(Keys) Set Jitem = cJS.GetObjectProperty(JsonObject, Keys(lRow - 1)) Debug.Print cJS.GetProperty(Jitem, "ElectronicId") Debug.Print cJS.GetProperty(Jitem, "DocumentNr") Debug.Print cJS.GetProperty(Jitem, "DocumentTypeId") Next lRow
Once again here is the JSON string:Code:Set JsonObject = cJS.GetObjectProperty(JsonObject, "ROOT")
Does anyone have any ideas?Code:[{"ElectronicId":551720,"DocumentNr":"130/10/15","DocumentTypeId":1,"DocumentTypeName":"eInvoice","StatusId":30,"StatusName":"Sent","RecipientBusinessNumber":"0050960000","RecipientBusinessUnit":"","RecipientBusinessName":"Comp d.o.o.","Created":"2019-07-23T21:21:23.743","Updated":"2019-07-23T21:21:24.587","Sent":"2019-07-23T21:21:24.587","Delivered":null},{"ElectronicId":551721,"DocumentNr":"130/10/15","DocumentTypeId":1,"DocumentTypeName":"eInvoice","StatusId":30,"StatusName":"Sent","RecipientBusinessNumber":"00509605454","RecipientBusinessUnit":"","RecipientBusinessName":"Comp d.o.o.","Created":"2019-07-23T21:23:05.887","Updated":"2019-07-23T21:23:07.043","Sent":"2019-07-23T21:23:07.043","Delivered":null}]




Reply With Quote
