title: Pagination on array stored in a document field
body: <p>Let's say I've got a collection People in mongo database:</p>
  
  <pre><code>[{
      id: 1,
      name: "Tom",
      animals: ["cat", "dog", "fish", "bear"]
  },
  {
      id: 2,
      name: "Rob",
      animals: ["shark", "snake", "fish", "bear", "panda"]
  },
  {
      id: 3,
      name: "Matt",
      animals: ["cat", "fish", "bear"]
  }]
  </code></pre>
  
  <p>For the purpose of REST API I need to create a pagination system for viewing people's animals and return only 3 per request. So for example if you go to <code>/people/2</code>the API should return this array:</p>
  
  <pre><code>["shark", "snake", "fish"]
  </code></pre>
  
  <p>I'm trying to get this result using Mongo methods. Here's my attempt:</p>
  
  <pre><code>db.getCollection('people').find({id: 2}, {animals: 1, _id:0}, {limit: 3})
  </code></pre>
  
  <p>Unfortunatelly it doesn't work like that and returns the whole object. Can anybody tell me how to do it?</p>