Javascript does not have the concept of a 2D array in the same sense as C #. To get an array like the one described here , you need to create an array of arrays.
// output: [[1,1,1,1],[2,2,2,2]] var a = new int[][] { new[]{ 1, 1, 1, 1 }, new[]{ 2, 2, 2, 2 } };
Update:
This is similar to JSON.NET now converting multidimensional arrays into an array of arrays in JSON, so the code in OP will work just as if you were using the code above.
Stripling warrior
source share