Hi,
I need to call a function in my Javascript which takes a Javascript object as parameter. The catch is that the property names of the object are something like "a.b" or "foo.bar" and they are dynamic, so I cannot create a static object to call with.
Is there any way to call the function with a Dictionary<string, object> and have it converted to a Javascript object automatically?
So far I've done a workaround:
Thanks a lot!
I need to call a function in my Javascript which takes a Javascript object as parameter. The catch is that the property names of the object are something like "a.b" or "foo.bar" and they are dynamic, so I cannot create a static object to call with.
Is there any way to call the function with a Dictionary<string, object> and have it converted to a Javascript object automatically?
So far I've done a workaround:
- Create the Dictionary<string, object>, add values
- Convert it to JSON
- Call the Javascript function
-
In the function use JSON.parse to turn it into a Javascript object
Thanks a lot!