Reputation: 827
Using Power Automate, I would like to remove partial duplicate items in an array. Below is an example. How can I end up with only 2 items (order numbers 123 and 456) in the array?
[
{
"cr52a_ordernumber": "123",
"cr52a_date": "12-15-22"
},
{
"cr52a_ordernumber": "123",
"cr52a_date": "12-14-22"
},
{
"cr52a_ordernumber": "123",
"cr52a_date": "12-16-22"
},
{
"cr52a_ordernumber": "456",
"cr52a_date": "12-17-22"
},
{
"cr52a_ordernumber": "456",
"cr52a_date": "12-18-22"
}
]
Upvotes: 0
Views: 140
Reputation: 11262
The Advanced Data Operations
connector has an operation for exactly this purpose. There is a small cost per month if you decide to sign up but you can get a trial and see what else it has on offer as to whether or not you find it useful.
This is what I tested with ...
Your array of data is contained within the first Initialize Order Array
step.
This is the end result ...
Upvotes: 1