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

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -