Added better support for json arrays