It is required to post this as a comment as a note on the accepted answer, but this is a bit unclear. As clean as a note:
If you do not need the objects themselves, and you want your project to be cleared of other unused classes, you can parse something like:
var list = JObject.Parse(json)["People"].Select(el => new { FirstName = (string)el["FirstName"], LastName = (string)el["LastName"] }).ToList(); var firstNames = list.Select(p => p.FirstName).ToList(); var lastNames = list.Select(p => p.LastName).ToList();
Even when using a strongly typed person class, you can skip the root object by creating a list using JObject.Parse(json)["People"].ToObject<List<Person>>() Of course, if you need to reuse objects, it's better to create them from the very beginning. Just wanted to point to an alternative;)
source share