Seeking assistance with transitioning a C# function to TypeScript/Angular JS 2:
public static MyModel GetDetails(IDictionary<string, object> Obj) {
MyModel dlModel = new MyModel();
if (Obj.ContainsKey("action"))
dlModel.action = ((IEnumerable<object>)Obj["action"]).Cast<string>().ToList();
if (Obj.ContainsKey("parameters")) {
List<object> pr = ((IEnumerable<object>)Obj["parameters"]).Cast<object>().ToList();
foreach (object obj in pr) {
IDictionary<string, object> kValue = (IDictionary<string, object>)obj;
dlModel.parameters.Add(new KeyValuePair<string, string>(kValue["Key"].ToString(), kValue["Value"].ToString()));
}
}
Need guidance on utilizing IDictionary and IEnumerable data types in TypeScript for the above scenario.