c# json object key value code example
Example: c# json foreach key value
var dict = JObject.Parse(@"{""1"":""Name 1"",""2"":""Name 2""}");
var dict = JsonConvert.DeserializeObject<Dictionary<string, string>>(json);
foreach(var kv in dict)
{
Console.WriteLine(kv.Key + ":" + kv.Value);
}