title: query for jobject child with specific attribute value
body: <p>i need to load xml data into newtonsoft JObject and query for specific name &amp; value nodes...</p>
  
  <p>this is just a simplified sample, the problem is in the last line of code, resultSecondLevel is null even if there is an element child of resultFirstLevel with the ID i'm is looking for...</p>
  
  <p>example:</p>
  
  <pre><code>  int idFirst = 2;
              int idSecond = 4;
              string json = string.Empty;
              JObject jFirstLevels = new JObject();
  
              string xml = "&lt;Root&gt;&lt;FirstLevel id=\"1\"&gt;&lt;Secondlevel id=\"1\"  value=\"hello11\" /&gt;&lt;Secondlevel id=\"2\"  value=\"hello12\" /&gt;&lt;Secondlevel id=\"3\"  value=\"hello13\" /&gt;&lt;/FirstLevel&gt;&lt;FirstLevel id=\"2\"&gt;&lt;Secondlevel id=\"4\" value=\"hello24\" /&gt;&lt;/FirstLevel&gt;&lt;FirstLevel id=\"3\"&gt;&lt;Secondlevel id=\"5\" value=\"hello35\" /&gt;&lt;Secondlevel id=\"6\" value=\"hello36\" /&gt;&lt;Secondlevel id=\"7\" value=\"hello37\" /&gt;&lt;/FirstLevel&gt;&lt;/Root&gt;";
  
              XmlDocument xmlDoc = new XmlDocument();
              xmlDoc.LoadXml(xml);
  
              XmlNodeList nodeList;
              nodeList = xmlDoc.SelectNodes("Root/FirstLevel");
              if (nodeList != null)
              {
                  if (nodeList.Count &gt; 1)
                  {
                      JArray jarray = new JArray();
  
                      foreach (XmlNode node in nodeList)
                      {
                          json = Newtonsoft.Json.JsonConvert.SerializeXmlNode(node);
                          jarray.Add(JObject.Parse(json));
                      }
                      jFirstLevels["result"] = jarray;
                  }
              }
  
              JObject resultFirstLevel = jFirstLevels["result"].Children&lt;JObject&gt;().FirstOrDefault(x =&gt; x["FirstLevel"]["@id"].Value&lt;int&gt;() == idFirst);
              JObject resultSecondLevel = resultFirstLevel.Children&lt;JObject&gt;().FirstOrDefault(x =&gt; x["SecondLevel"]["@id"].Value&lt;int&gt;() == idSecond);
  </code></pre>