Closed ParfaitG closed 2 years ago
Try passing Variant type to receive result of JSON.parse
Dim parsedJSON As Variant, element As Variant
parsedJSON returns Variant Array of Dictionary in your case.
IsArray(parsedJSON) 'True
IsObject(parsedJSON) 'False
hope this helps.
That was it. Thanks @danoxp!
When attempting to parse a JSON type that is encapsulated in a list with
[...]
as shown below rather than key value pair,{...}
,JSON.parse
raises a runtime error for type mismatch on aReDim
line of an array.Format
Reprex
Error