ArduinoJson 5 is deprecated.
Consider upgrading to version 6 or version 7.
How to know the type of a value?
JsonVariant, which is the type that hold the values in JsonArray and JsonObject, provides the method is<T>() that returns true if the value is of type T.
In the “Case Studies” chapter of Mastering ArduinoJson, there is a complete example that shows how to display the type and value of all the members of an object, and of all its children recursively.