Command query to array