title: Extract one/many property from a json object array into another object
body: <p>I have got a JSON object array like this</p>
  <pre><code>[
    {&quot;Project&quot;:&quot;Project 1&quot;,&quot;Domain&quot;:&quot;Domain1&quot;,&quot;Manager&quot;:&quot;Manager1&quot;},
    {&quot;Project&quot;:&quot;Project 2&quot;,&quot;Domain&quot;:&quot;Domain2&quot;,&quot;Manager&quot;:&quot;Manager2&quot;},  
    {&quot;Project&quot;:&quot;Project 3&quot;,&quot;Domain&quot;:&quot;Domain3&quot;,&quot;Manager&quot;:&quot;Manager1&quot;},
    {&quot;Project&quot;:&quot;Project 4&quot;,&quot;Domain&quot;:&quot;Domain1&quot;,&quot;Manager&quot;:&quot;Manager3&quot;},
    {&quot;Project&quot;:&quot;Project 5&quot;,&quot;Domain&quot;:&quot;Domain5&quot;,&quot;Manager&quot;:&quot;Manager4&quot;},
    {&quot;Project&quot;:&quot;Project 6&quot;,&quot;Domain&quot;:&quot;Domain6&quot;,&quot;Manager&quot;:&quot;Manager5&quot;},
    {&quot;Project&quot;:&quot;Project 7&quot;,&quot;Domain&quot;:&quot;Domain5&quot;,&quot;Manager&quot;:&quot;Manager2&quot;},
    {&quot;Project&quot;:&quot;Project 8&quot;,&quot;Domain&quot;:&quot;Domain2&quot;,&quot;Manager&quot;:&quot;Manager5&quot;},
    {&quot;Project&quot;:&quot;Project 9&quot;,&quot;Domain&quot;:&quot;Domain7&quot;,&quot;Manager&quot;:&quot;Manager8&quot;},
    {&quot;Project&quot;:&quot;Project 10&quot;,&quot;Domain&quot;:&quot;Domain9&quot;,&quot;Manager&quot;:&quot;Manager9&quot;},
    {&quot;Project&quot;:&quot;Project 11&quot;,&quot;Domain&quot;:&quot;Domain6&quot;,&quot;Manager&quot;:&quot;Manager1&quot;}
  ]
  </code></pre>
  <p>From the above object array I am required to extract all distinct domains and managers into another 2 string arrays</p>
  <p>So what I am trying is like this</p>
  <pre><code>Domains:string[]=[];
  Domains= res.map((x)=&gt;x.Domain);
  Managers:string[]=[];
  Managers= res.map((x)=&gt;x.Manager);
  </code></pre>
  <p>Its working, but it has duplicates in both arrays.</p>
  <p>Also is there is any better way to assign those variables in a single map function rather than separately ?</p>