Thanks so much for your comprehensive explanation.
The IEnumerable<> (or ICollection<>) in my case is actually a property within a class, (it did not show because I tried to focus on handling that collection property) and I instantiate the property with HashSet(), which should be OK.
However, there is a problem with the code you provided:
var Cats = [];
var temp;
for (var i = 0; i < Categories.length; i++) {
//temp = { Id: i, Category: Categories[i] };
temp = { Id: i };
temp["Category"] = Categories[i];
Cats = Cats.push(temp);
}
In the above, "Cats = Cats.push(temp);" does not work. (the "push" does not even show up in intellesence).
In my code I include only jquery-3.3.1.js. Do I miss anything?
Member
19 Points
66 Posts
Re: Fail to set up a jQuery collection
Jun 13, 2020 02:13 AM|GoldenMicrosoft|LINK
Hi Bruse,
Thanks so much for your comprehensive explanation.
The IEnumerable<> (or ICollection<>) in my case is actually a property within a class, (it did not show because I tried to focus on handling that collection property) and I instantiate the property with HashSet(), which should be OK.
However, there is a problem with the code you provided:
In the above, "Cats = Cats.push(temp);" does not work. (the "push" does not even show up in intellesence).
In my code I include only jquery-3.3.1.js. Do I miss anything?
Golden