Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how does a dictionary from c# translate into js

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
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dictionary #translate #js
ADD COMMENT
Topic
Name
3+3 =