My JSON data may have different formats. For example, it could look like this:
"coordinates":
[
[[100.0,0.0],[101.0,0.0],[101.0,1.0],[100.0,1.0],[100.0,0.0]],
[[100.2,0.2],[100.8,0.2],[100.8,0.8],[100.2,0.8],[100.2,0.2]]
]
This format appears as an array of arrays and needs to be handled differently from something like this:
"coordinates":[30.0,10.0]
I was previously making decisions based on the length of the coordinates array (which is always 2 in these cases). However, I now need to ensure that it's not an array of arrays before taking certain actions.