You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an array of objects with duplicates and I'm trying to get a unique listing, where uniqueness is defined by a subset of the properties of the object. For example,
{a:"1",b:"1",c:"2"}
And I want to ignore c in the uniqueness comparison.
Answer
vardata=[{a:"1",b:"1",c:"2"},{a:"1",b:"1",c:"1"}];varres=alasql('SELECT a,b FROM ? GROUP BY a,b',[data]);