title: Grouping few columns of JSON array Newtonsoft c#
body: <p>I have a JSON structure like this</p>
  
  <pre><code>{
    "Success": true,
    "Errors": [],
    "Warnings": [],
    "PageNumber": 1,
    "RecordsPerPage": 1000,
    "TotalPages": 2,
    "TotalRecords": 1555,
    "Data": [
      {
        "Project Code": "P4533",
        "Project Name": "Test Project",
        "November 2020": "200.00",
        "October 2020": "600.00",
        "July 2020": "100.00",
        "June 2020": "30.00",
        "February 2020": "550.00",
        "April 2020": "90.00",
        "August 2020": "50.00",
        "December 2020": "110.00",
        "September 2020": "80.00",
        "January 2020": "1000.00",
        "May 2020": "250.00",
        "March 2020": "80.00",
        "Total": "0.00"
      },
      {
        "Project Code": "P3456",
        "Project Name": "P1",
        "November 2020": "270.00",
        "October 2020": "900.00",
        "July 2020": "80.00",
        "June 2020": "40.00",
        "February 2020": "1000.00",
        "April 2020": "70.00",
        "August 2020": "500.00",
        "December 2020": "20.00",
        "September 2020": "450.00",
        "January 2020": "200.00",
        "May 2020": "300.00",
        "March 2020": "500.00",
        "Total": "0.00"
      }
  ]
  }
  </code></pre>
  
  <p>I'm using Newtonsoft to Deserialize the above into an Class with a different structure. So its not having data for each of the month. I need to group each of the quarter and sum corresponding column for that. Then assign that to my class object.</p>
  
  <p>Straight deserializing I am doing by</p>
  
  <pre><code>JsonConvert.DeserializeObject&lt;project&gt;(myjson);
  </code></pre>
  
  <p>But how can I manipulate the data to get a quarterwise data. Is there is any LINQ way for that??</p>
  
  <p>Output data could be something like this</p>
  
  <pre><code>{
        "Success": true,
        "Errors": [],
        "Warnings": [],
        "PageNumber": 1,
        "RecordsPerPage": 1000,
        "TotalPages": 2,
        "TotalRecords": 1555,
        "Data": [
          {
  
            "Project Code": "P4533",
            "Project Name": "Test Project",
            "Q1" : 1630,
            "Q2" : 370,
            "Q3" : 230,
            "Q4" : 910,
            "Total" :3160
          },
          {
            "Project Code": "P3456",
            "Project Name": "P1",
            "Q1" : 1700
            "Q2" : 410
            "Q3" : 1030
            "Q4" : 1190
            "Total" : 4630
          }
      ]
  }
  </code></pre>
  
  <p>This is how my class looks like</p>
  
  <pre><code>public class KipProjects
  {
      public bool Success { get; set; }
      public int TotalRecords { get; set; }
      public ProjectData[] Data { get; set; }
      [JsonProperty(PropertyName = "Data")]
      public ForecastData Data2 { get; set; }
  
  
  }
  public class ForecastData
  {
      public string Quarter1 { get; set; }
      public string Quarter2 { get; set; }
      public string Quarter3 { get; set; }
      public string Quarter4 { get; set; }
      public string  Total { get; set; }
  
  }
  </code></pre>