Hi Folks,
I have an array, given below, I need to remove the duplicate entry based on two conditions, so for eg, if you look into the array, 2nd and 3rd entry is almost same, just the created time is different, so I need to check if email address is same or not if yes then remove the 3rd entry as the 2nd entry is the latest one. I can do this with if else but lets say in future there are 1000+ entry then this loop will take a long time to complete, I am sure this can be done using Union(), Intersection(), but not able to create one
[
{
"First Name": "Toomas",
"Last Name": "K",
"Email Address": "too@hotmail.com",
"Created Time": "2022-07-24T22:57:54+0000"
},
{
"First Name": "Paul",
"Last Name": "Ls",
"Email Address": "Paul.l@taltech.ee",
"Created Time": "2022-07-21T08:43:27+0000"
},
{
"First Name": "Paul",
"Last Name": "Ls",
"Email Address": "Paul.l@taltech.ee",
"Created Time": "2022-07-21T07:43:27+0000"
}
]
Thanks in Advance
@ekarim2020 @abm please help me with this
Solved! Go to Solution.
@PowerUser0 Please use this-
Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.
@PowerUser0 Please use this-
Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.
Hi @Hardesh15 , thanks for your solution, as I mentioned I want to keep that record whose date & time is latest, for eg. out of 2nd and 3rd array value, the 2nd array value should be kept as the time in that is 08:43, so if I place 2nd array in 3rd place this flow will give me the 07:43 time array
@PowerUser0 What is your source of array?
Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.
@Hardesh15 these are the leads coming from facebook, using, we are making an api call then using parse json we are creating this array after mutiple filters.
@PowerUser0 I was thinking to sort this based on created date so that it will picked latest item. if i get something will post it.
Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.
Hi @Hardesh15 , I found this article which solved the problem of sorting, here is the link.
http://johnliu.net/blog/2018/12/how-to-implement-sort-with-microsoft-flow-in-3-actions-within-a-loop
Thanks for your help and ideas.
User | Count |
---|---|
24 | |
14 | |
13 | |
10 | |
9 |
User | Count |
---|---|
51 | |
29 | |
29 | |
24 | |
22 |