public void Descendants() { JArray a = new JArray( 5, new JArray(1), new JArray(1, 2), new JArray(1, 2, 3) ); List<JToken> descendants = a.Descendants().ToList(); Assert.AreEqual(10, descendants.Count()); Assert.AreEqual(5, (int)descendants[0]); Assert.IsTrue(JToken.DeepEquals(new JArray(1, 2, 3), descendants[descendants.Count - 4])); Assert.AreEqual(1, (int)descendants[descendants.Count - 3]); Assert.AreEqual(2, (int)descendants[descendants.Count - 2]); Assert.AreEqual(3, (int)descendants[descendants.Count - 1]); }