Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Convert .net IEnumerable to JS array

0
0
Hi,

I have a JS script, which I cannot change and I need to execute it to get a result. I successfully passed some objects into the engine but I have a problem with arrays. Since I have no control over the script itself, the input objects have to be converted into compatible JS objects.

How can I convert .net array into JS array without modification of the script?

Inside the script I have to be able to access the array.length property, but .net Array, which is passed in has Array.Length property (and misses another functions).

Thank you
Petr

Viewing all articles
Browse latest Browse all 2297

Latest Images

Trending Articles





Latest Images