JArray array = JsonConvert.DeserializeObject<JArray>(json);
foreach(JObject item in array)
{
var a = item.Children<JProperty>().FirstOrDefault().Name;
var b = item.Children<JProperty>().FirstOrDefault().Value;
}
Here if you have only one property in every element of the array. If you have multiple properties you need to loop all the children.
Check dotNetFiddle for full code example.
EDIT
If you have more than one property per object your loop should look like this.
foreach(JObject item in array)
{
foreach(var prop in item.Children<JProperty>())
{
Console.WriteLine(prop.Name + ": " + prop.Value);
}
//Console.WriteLine(item.Children<JProperty>().FirstOrDefault().Name + ": " + item.Children<JProperty>().FirstOrDefault().Value);
}
CustomTypeclass look like?{"key1":"value1", "key2":"value2"}Then you would deserialize it likeJsonConvert.DeserializeObject<Dictionary<string, string>(str);Is this what you are looking for?