title: How do i query a collection in Cosmos DB in two steps?
body: <p>I have a single collection in Cosmos DB where documents are separated in two types. Let's call them <code>board</code> and <code>pin</code>.</p>
  
  <p><strong>Board:</strong></p>
  
  <pre><code>{
    "id": "board-1",
    "description": "A collection of nice pins",
    "author": "user-a",
    "moments": [
      {
        "id": "pin-1"
      },
      {
        "id": "pin-2"
      },
      {
        "id": "pin-3"
      }
    ]
  }
  </code></pre>
  
  <p><strong>Pin:</strong></p>
  
  <pre><code>{
    "id": "pin-1",
    "description": "Number 1 is the best pin",
    "author": "user-b"
  }
  </code></pre>
  
  <p>I know how to query just a board of pin based on id. But i Need to query that (based on the id of the board) which gives me all the pins contained in a board. It would also be good if I could filter out one or more parts of the Pins.</p>
  
  <p>Example: Not returning the author to the client.</p>
  
  <pre><code>{
    "id": "pin-1",
    "description": "Number 1 is the best pin"
  },
  {
    "id": "pin-2",
    "description": "Number 2 is very funny"
  }..etc
  </code></pre>
  
  <p>I know I could handle this logic in the client app by making two requests, but is it possible to write a query for Cosmos DB that handles this?</p>