I am having duplicate records in my observable, How do I remove only the duplicate records,
I am having an API that retrieves data from a server and I have pull to load method as well as infinite scrolling the thing is if data retrieved from a server is not a new data it adds into the observable as duplicates, now I need to know how to avoid and here is a sample code:
for (var i=0; i<items.length; i++) {
if(opts.more){
feed.add(items[i])
}
else {
feed.insertAt(i, items[i]);
}
}
So if anyone can help, I’d highly appreciate it.