I am trying to pass a Json object (of type "Object") to a function and access some of this Json's values from inside the function and I keep getting a type mismatch error. Any help ?
Public json As Object
Sub Main()
'Some HTTP request logic
Set json = JsonConverter.ParseJson(httpCall.responseText)
someFunction json, "name", "id"
End Sub
Function someFunction(dataJson as Object, arg1 As String, arg2 As String)
Debug.Print dataJson(1)(arg1)(arg2) 'this uses the VBA JSON library
'As soon as I access items within dataJson, I get the type mismatch error
End Function
I am trying to pass a Json object (of type "Object") to a function and access some of this Json's values from inside the function and I keep getting a type mismatch error. Any help ?