Task
Output the values from an IEnumerable of simple types in a view.
Conditions
I have a model, passed in by the controller, that contains an array of simple values (in this case int). I want to output it into a variable in a JavaScript block in the view.
Standards
Without using a large foreach block and iterating over each item and then figuring out the commas, output the values in such a way that is similar to the statement seen below.
Example
var packageSummaryViewModel = new PackageSummaryViewModel([1,2,3,4,5,6,7]);
Currently this is what is happening:
View.cshtml
var packageSummaryViewModel = new PackageSummaryViewModel(@sensorIds);
Output
var packageSummaryViewModel = new PackageSummaryViewModel(System.Int32[]);