I need help transferring a double array from C# to JavaScript dynamically. Currently, I am using the following approach:
var serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
var jsLat = serializer.Serialize(lat);
After that, I use InvokeScript
with jsLat
as a parameter.
When trying lat.length
on the JS side, I get the correct length. However, when attempting lat[#]
, all values return as undefined.
Additionally, utilizing alert(lat.valueOf())
shows all the values. Why is it that all values are appearing as undefined?