title: Express middleware to wrap response
body: <p>I'm implementing an API where the result needs to be return wrapped by a result key, as such</p>
  
  <pre><code>{
    result: [
      {
        id: 1,
        name: "Bob"
      }
    ]
  }
  </code></pre>
  
  <p>What I'd like to do is add a piece of middleware (if possible) that does this wrapping to every response without having to think about it every time. What would be the best way to accomplish this? I could see modifying <code>response.body</code> and then calling <code>next()</code> instead of doing <code>res.send(obj)</code> (what I'm doing now).</p>
  
  <p>Thanks!</p>