razor list to js array 1

razor list to js array

Here is what the above code is Doing:
1. We are creating a javascript array called myArray
2. We are looping through the data in the Model.data property
3. We are pushing each item in the Model.data property into the myArray javascript array

Now that we have our data in a javascript array, we can use it to create a chart.

Similar Posts