Adding the [] operator to API::Document