I have the following C# array and I would like to pass it to JavaScript. What would be the best way to achieve it? Thank you?
public static List<ListDetail> GetMyList()
{
List<ListDetail> myList = new List<ListDetail>();
myList.Add(new ListDetail() { Id = 1, Name = "Party" });
myList.Add(new ListDetail() { Id = 2, Name = "Course" });
myList.Add(new ListDetail() { Id = 3, Name = "Home" });
return myList.ToArray;
}