using System;
using System.Collections.Generic;
using System.Linq;
using Shouldly;
public class Program
{
public class A {
public int Id {get;set;}
public string Version {get;set;}
}
public static void Main()
var response = new {
Formats = new List<A>{
//new A {
// Id = 42, Version = "42"
//}
};
var result = response.Formats.SingleOrDefault(x => x.Id == 42);
result?.Version.ShouldBe("42");
Console.WriteLine("Hello World");