Is their any way to get unique result from the payload list data with search input string in watcher?

I have passed more than 2 input string in watcher and revived the listed payload data from Elastic Search but now i want to send mail only on latest result for each input string data in payload instead of all payload having multiple result for same input string. How we can implement ?

I am not sure I understand the requirement, can you supply some sample documents to clear up the confusion on my side?

Thanks!