private static void AssertOnResponse(DynamicResponse response) { response.Get <string>("object.first") .Should() .NotBeEmpty() .And.Be("value1"); response.Get <string>("object._arbitrary_key_") .Should() .NotBeEmpty() .And.Be("first"); response.Get <int>("array.1").Should().Be(2); response.Get <long>("array.1").Should().Be(2); response.Get <long>("number").Should().Be(29); response.Get <long?>("number").Should().Be(29); response.Get <long?>("number_does_not_exist").Should().Be(null); response.Get <long?>("number").Should().Be(29); response.Get <string>("array_of_objects.1.second") .Should() .NotBeEmpty() .And.Be("value22"); response.Get <string>("array_of_objects.1.complex\\.nested.x") .Should() .NotBeEmpty() .And.Be("value6"); /** * You can project into arrays using the dot notation */ response.Get <string[]>("array_of_objects.first") .Should() .NotBeEmpty() .And.HaveCount(2) .And.BeEquivalentTo(new[] { "value11", "value21" }); /** * You can even peek into array of arrays */ var nestedZs = response.Get <int[][]>("array_of_objects.nested.z.id") //.SelectMany(d=>d.Get<int[]>("id")) .Should() .NotBeEmpty() .And.HaveCount(2) .And.BeEquivalentTo(new[] { new[] { 1 }, new[] { 3, 2 } }); }