title: Select objects with unique ID's as another object type using LINQ
body: <p>Using <code>LINQ</code>, I'm trying to select unique <code>Customer</code>'s as <code>Person</code> objects. I'm using <code>JSON</code> data in the following example but I'm working with <code>POCO</code> objects in <code>C#</code>. In this example, I chose <code>JSON</code> to keep things simple.</p>
  
  <p>I have the following <code>Customer</code> list:</p>
  
  <pre><code>[
    {
       "id": 123,
       "name: "John Smith",
       "transactionDate": "2019-08-21T10:30",
       "amount": 8.50
    },
    {
       "id": 234,
       "name: "Jane Doe",
       "transactionDate": "2019-08-22T18:21",
       "amount": 75.00
    },
    {
       "id": 123,
       "name: "John Smith",
       "transactionDate": "2019-08-26T10:30",
       "amount": 10.00
    }
  ]
  </code></pre>
  
  <p>I want to get the unique customers as <code>Person</code> objects and the result, should look like this:</p>
  
  <pre><code>[
    {
       "id": 123,
       "name": "John Smith"
    },
    {
       "id": 234,
       "name": "Jane Doe"
    }
  ]
  </code></pre>
  
  <p>The following should give me the unique ID's.</p>
  
  <pre><code>var uniqueIds = customers.Select(x =&gt; x.id).Distinct();
  </code></pre>
  
  <p>How do I now extract unique <code>Person</code>'s from <code>List&lt;Customer&gt;()</code>?</p>