title: Generate a list of custom objects from Json object using LINQ
body: <p>Currently I am facing an issue to create a LINQ statement which will generate the list of objects that I want. The following section is an example of the LINQ object that i want to process.</p>
  
  <pre><code>{
    "successful": "true",
    "result": [
      [
        {
          "Param1": "A1",
          "Param2": "A2",
          "Param3": "A3",
          "Param4": "A4",
          "Param5": "1",
          "Param6": "A5",
        },
        {
          "Param1": "B1",
          "Param2": "B2",
          "Param3": "B3",
          "Param4": "B4",
          "Param5": "2",
          "Param6": "B5",
        },
        {
          "Param1": "C1",
          "Param2": "C2",
          "Param3": "C3",
          "Param4": "C4",
          "Param5": "2",
          "Param6": "C5",
        }
      ]
    ]
  }
  </code></pre>
  
  <p>I have a custom object class as follow,</p>
  
  <pre><code>public class CContainer
  {
      public string param1{ get; set; }
  
      public string param2{ get; set; }
  
      public string param3{ get; set; }
  }
  </code></pre>
  
  <p>My end goal is to create a list of CContainer objects, that contain only the first 3 parameters (Param1, Param2, and Param3) for each item under the 'result' category. Also, I would like to select only item which its <strong>Param5 == "2"</strong>. I am currently unable to do that using LINQ, please advice.</p>
  
  <p>The following snippet don't work (even if I remove the 'Where' clause).</p>
  
  <pre><code>    List&lt;CContainer&gt; testList = new List&lt;CContainer&gt;();
      string responseRet = await response.Content.ReadAsStringAsync();
      JObject o = JObject.Parse(responseRet);
  
      testList =
       (from item in o["result"]
        where item["Param5"].Value&lt;string&gt;() == "2"
        select new CCOntainer
        {
            param1 = item["Param1"].Value&lt;string&gt;(),
            param2 = item["Param2"].Value&lt;string&gt;(),
            param3 = item["Param3"].Value&lt;string&gt;(),
        }).ToList();
  </code></pre>