I am accessing a Javascript object (which has a form similar to this: { 1 : "Option 1", 2 : "Option 2", 3 : "Option 3" }) from Silverlight using code similar to the following:
dynamic window = HtmlPage.Window;
var options = window.GlobalObject.getDropdownItems();
Now, the problem is that options is now of type ScriptObject. This wouldn't be a problem if I knew what the names of the properties of my Javascript object were (I could just do options.GetProperty(1) to get the label for the first option). However, this won't work because I need both the values and the names of the options. Is there some way to convert it to a Dictionary<int, string> or something similar?