This assumes the decoded json is an array - the previous check should therefore use `is_array()`