title: Read JSON using JSON.net c# with nested arrays
body: <p>I have a dataset in JSON and using C# JSON.net library i'm trying to read the data as concatenated string, but having trouble extracting the data. The data has root element, then rows. For each row within "rows" I want to pull out a list of 
  ["conversionPathValue"]["nodeValue"] values and concatenate them together, then concatenate them with the primitiveValue values. Example code of 2 rows is below:</p>
  
  <pre><code>      "rows": [
          [
            {
              "conversionPathValue": [
                {
                  "interactionType": "CLICK",
                  "nodeValue": "MET"
                }
              ]
            },
            {
              "primitiveValue": "20130122"
            },
            {
              "primitiveValue": "000"
            },
            {
              "primitiveValue": "000001"
            },
            {
              "primitiveValue": "000"
            },
            {
              "primitiveValue": "11"
            },
            {
              "primitiveValue": "7290.521799"
            }
          ],
          [
            {
              "conversionPathValue": [
                {
                  "interactionType": "CLICK",
                  "nodeValue": "MET"
                },
                {
                  "interactionType": "CLICK",
                  "nodeValue": "MET"
                },
                {
                  "interactionType": "CLICK",
                  "nodeValue": "MET"
                },
                {
                  "interactionType": "CLICK",
                  "nodeValue": "MET"
                },
                {
                  "interactionType": "CLICK",
                  "nodeValue": "MET"
                },
                {
                  "interactionType": "CLICK",
                  "nodeValue": "MET"
                },
                {
                  "interactionType": "CLICK",
                  "nodeValue": "MET"
                },
                {
                  "interactionType": "CLICK",
                  "nodeValue": "MET"
                },
                {
                  "nodeValue": "(none)"
                },
                {
                  "nodeValue": "(none)"
                },
                {
                  "interactionType": "CLICK",
                  "nodeValue": "organic"
                }
              ]
            },
            {
              "primitiveValue": "20130122"
            },
            {
              "primitiveValue": "000"
            },
            {
              "primitiveValue": "000011"
            },
            {
              "primitiveValue": "005"
            },
            {
              "primitiveValue": "1"
            },
            {
              "primitiveValue": "1628.0"
            }
          ],
                      .....etc........
  </code></pre>
  
  <p>Using the following code: (jsonExtract is a JObject)</p>
  
  <pre><code>            var rows = jsonExtract["root"]["rows"][0].Children();
  
              foreach (JToken result in rows)
              {
                  var primitiveValues = result["primitiveValue"].Values&lt;string&gt;();
                  var pathValues = result["conversionPathValue"].Values&lt;string&gt;();
  
                  string joinedprimitiveValues = string.Join(",", primitiveValues);
                  string joinedpathValues = string.Join("-", pathValues);
  
                  file2.WriteLine(joinedpathValues + ", " + joinedprimitiveValues);
  
              }
  </code></pre>
  
  <p>This gives an error of 
  "Object reference not set to an instance of an object" when setting primitiveValues.</p>
  
  <p>I know the problem is probably down to the nested elements, but I don't know how to cater for these. Can anyone assist please?</p>