title: fetch details from other documents
body: <p>Let's say I design a couchdb app for taking orders in a bar.
  I have a database containing products and orders.</p>
  
  <p>A product looks like:</p>
  
  <pre><code>{ _id: "beer", type: "product", price: 5 }
  { _id: "juice", type: "product", price: 2 }
  </code></pre>
  
  <p>And an order looks like:</p>
  
  <pre><code>{ _id: "order for table 1", type: "order", items: { "beer": 1, "juice": 4 } }
  </code></pre>
  
  <p>Here, the <em>table 1</em> has ordered <em>1 beer</em> and <em>4 juices</em>.</p>
  
  <p>I want to create a design document that would output something like</p>
  
  <pre><code>{
    _id: "order for table 1",
    items: {
      beer: {
        price: 5,
        quantity: 1
      },
      juice: {
        price: 2,
        quantity: 4
      }
    }
  }
  </code></pre>
  
  <p>What does the map function looks like ?</p>