c# mvc 5 from list viewdata to javascript array code example
Example: @razor rener an array of strings
<script type="text/javascript">
var myArray = [];
@foreach (var d in Model.data)
{
@:myArray.push("@d");
}
alert(myArray);
</script>