im new to the MVC pattern and got a problem passing variables to JS from C#.
Im passing a List from the viewmodel to the view that im storing in a hidden variable:
<input type="hidden" id="myID" name="myID" value="@Model.myList">
Then when im trying to grab this variable in JS:
const myList = document.getElementById("myID").value;
But then I get a System.Collections.Generic.List that I cant do anything with. How can i make it so that I can reach this List in JS?