How can I easily do these type of loops in Jquery or Javascript? Preferably without any other plugins.
string a = "";
foreach (var i in (from a in DbList1 select a.FieldA).Distinct())
{
a += i + ", ";
}
and this
foreach (var i in DbList2)
{
a += i.FieldB + ", ";
}
Loop number 2 could be solved like this atleast.
$.each(aData.DbList2, function (index, value) {
a += value.FieldB;
);
Not 100% sure this is the most effective though