asp.net core 3 convert object to ienumerable code example
Example 1: .net core convert keycollection to array
string[] keys = new string[dictionary.Keys.Count];
dictionary.Keys.CopyTo(keys, 0);
Example 2: asp.net core 3.1: cast jObject to dictionary
string json = @"{""key1"":""value1"",""key2"":""value2""}";
var values = JsonConvert.DeserializeObject<Dictionary<string, string>>(json);