📜  c#中的字典如何翻译成js - Javascript代码示例

📅  最后修改于: 2022-03-11 15:02:43.294000             🧑  作者: Mango

代码示例1
var dictionaryVariable //dictionary recieved from C#
dictionaryVariable["Key"] //will return specified key's value
for (var d in dictionaryVariable)
{
    if (dictionaryVariable.hasOwnProperty(d)) 
    {
        alert(d + '   ' + dictionaryVariable[d]); //displays key and value of all dictionary entries
    }
}