I have an object (JS) i my VBA which is returned from using jsonParser function. The data returned is in the image below
My code includes the following to retrieve the registration and make etc.
assign parseToVb(Response, js, , ok), result
'Fill in Results
'Make
Cells(RR, "L").Value = js.make
'Model
Cells(RR, "M").Value = js.model
'Colour
Cells(RR, "N").Value = js.primaryColour
And this works as I would expect. But what I cant do is reciver the "expiryDate" that is within the motTests
I have tried
MOT = js.motTests.motTestNumber.completedDate etc
MOT = js.motTests.0.expiryDate
MOT =js.motTests[0].expiryDate
but this isnt returning anything. Ideally I want to access this data (expiryDate) without entering the test number as I wont always know it.
Any help or pointers would be much appreciated. Thanks in advance.
My code includes the following to retrieve the registration and make etc.
assign parseToVb(Response, js, , ok), result
'Fill in Results
'Make
Cells(RR, "L").Value = js.make
'Model
Cells(RR, "M").Value = js.model
'Colour
Cells(RR, "N").Value = js.primaryColour
And this works as I would expect. But what I cant do is reciver the "expiryDate" that is within the motTests
I have tried
MOT = js.motTests.motTestNumber.completedDate etc
MOT = js.motTests.0.expiryDate
MOT =js.motTests[0].expiryDate
but this isnt returning anything. Ideally I want to access this data (expiryDate) without entering the test number as I wont always know it.
Any help or pointers would be much appreciated. Thanks in advance.