Online Home
var institutes = dt.AsEnumerable().Select(d => new { Institute = d.Field<String>("institute") }).Distinct();
string json = js.Serialize(institutes.Where(a => a.Institute != null));
reference:- https://stackoverflow.com/questions/38381612/c-sharp-linq-remove-null-values-from-an-array-and-return-as-not-nullable
No comments:
Post a Comment