c# - How to remove duplicates form string array -


i have string array contains json strings . possible identify , remove records contains same uid ?

{"object":"user","entry":[{"uid":"823602904340066","id":"823602904340066","time":1429276535,"changed_fields":["feed"]}]}  {"object":"user","entry":[{"uid":"10203227586595390","id":"10203227586595390","time":1429278537,"changed_fields":["feed"]}]}  {"object":"user","entry":[{"uid":"10203227586595390","id":"10203227586595390","time":1429278531,"changed_fields":["feed"]}]} 

a single item unique, duplication occurs in multiple items. so, first of convert data list

// convert list, add values list<myobject> array = jsonconvert.deserializeobject<list><myobject>>(json); // distinct items.. // use .tolist() convert list. array = array.distinct().tolist(); 

this above code first convert json list of objects. select distinct items after save non duplicate list actual list. can add condition distinct method using lambda expression.

check list ref


Popular posts from this blog

javascript - Js, document.getElementById("ID").innerHTML, error -

jquery - jqGrid update specific column data with out refreshing the entire column? -

objective c - Is there a way in OCMockito to make stubs fail when an unknown method is called? -