JSON: fixed issue with arrays of objects