Deal with different json response types.

So far only handles a maps with string keys, and
arrays.