added support for json arrays and filtering response