title: Convert List of Different Objects from DB to List of object in Entity Framework Core
body: <p>New to LINQ, I am not sure if I have put the problem into the right description.</p>
  
  <p>Want to convert the vertical structure  </p>
  
  <pre><code>[Label]    [Value]
  -Field1      1
  -Field2      2
  -Field3      3
  </code></pre>
  
  <p>To horizontal alignment like below</p>
  
  <pre><code>Field1  Field2  Field3 
    1       2       3     
  </code></pre>
  
  <p>Example:</p>
  
  <p>The below list of Objects I get it from Microservice in JSON format </p>
  
  <pre><code>{
    0: {Name: "Jason" , Age: 20 , Address: "London"}
    1: {Name: "Andy" , Age: 35, Address: "Boston"}
    2: {Name: "Mike", Age : 27,Address: "California"}
    3: {Name: "Maria", Age: 22,Address: "Arizona" }
  }
  </code></pre>
  
  <p>which should be converted to below format</p>
  
  <pre><code>{       
    0: {"Jason","Andy","Mike","Maria"}
    1: {20,35,27,22}
    2: {"London","Boston","California","Arizona"}
  }
  </code></pre>
  
  <p>I took care of it at UI front but I want to format it at service end so after Json serialization the 0th,1st,2nd Index should have Name,Age and Address respectively.</p>
  
  <p>Below is the Model which would hold the converted data at the backend. (it will be a list of the Model data)</p>
  
  <pre><code>public class Reviewer
  {
   public string Name { get; set; }
  
   public int Age { get; set; }
  
   public string Address {get;set;}
  }
  </code></pre>
  
  <p>I tried many ways to flatten the array and get the result into the above format still couldn't come up with the right one.</p>