showing a key and value pair of json using c# 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);
}