Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-2326

Distinct by multiple Keys

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Read Operations

      Find distinct records with the help of multiple keys within a collection in C#. Here, multiple keys are present in an string array.

      For example:

      If we have a collection, 

      collection = { [

      {firstName: "John", lastName: "Cena", age: 40}

      ,{firstName: "Prashant", lastName: "Gupta", age: 45}] }

      and we have an array:

      multiplekeys = {"lastName","age"}

      How can we find the distinct records in the collection using multiple keys?

            Assignee:
            wan.bachtiar@mongodb.com Wan Bachtiar
            Reporter:
            prashant.gupta4 Prashant
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: