Testing length of JSON array