It appears that this repetitive processing of the document members, ["container", "template", "message"] could be automated