Extract Specific data merged and sorted

Hey Team :wave:
I do know of a simple way to extract the information from the data below for each case. However, I am having trouble merging this by a specific identifier, as seen in the examples below.

From what I know, it is not possible to sort things using regex (non-programmatically), but I am wondering if something can be done with formulas.

This would be done in a snippet from clipboard.

Data:
[["Fruit":"Apple","City":"Rome","PriceID":"iuchsdz","Currency":"EUR","Seller":"XXX","Status":"Pending"],["Fruit":"Banana","City":"Paris","PriceID":"gfnuidhgd","Currency":"EUR","Seller":"YYY","Status":"Pending"],["Fruit":"Kiwi","City":"Rome","PriceID":"87huisdu","Currency":"USD","Seller":"ZZZ","Status":"Pending"],["Fruit":"Apple","City":"London","PriceID":"gdfiohge","Currency":"EUR","Seller":"XXX","Status":"Pending"],["Fruit":"Banana","City":"Rome","PriceID":"gfdgdf","Currency":"USD","Seller":"XXX","Status":"Pending"],["Fruit":"Mango","City":"Madrid","PriceID":"gherhg","Currency":"EUR","Seller":"ZZZ","Status":"Pending"],["Fruit":"Orange","City":"Berlin","PriceID":"htrhr","Currency":"EUR","Seller":"YYY","Status":"Pending"],

Result:
Seller: ZZZ
Fruit: Kiwi, City: Rome, PriceID: 87huisdu
Fruit: Mango, City: Madrid, PriceID: gherhg

Seller: YYY
Fruit: Banana, City: Paris, PriceID: gfnuidhgd,
Fruit: Orange, City: Berlin, PriceID: htrhr

Seller: XXX
Fruit: Apple, City: London, PriceID: gdfiohge
Fruit: Apple, City: Rome, PriceID: iuchsdz
Fruit: Banana, City: Rome, PriceID: gfdgdf

Hi, and welcome to the forum! :slight_smile:

Formulas can help you work with this. For example, here is one way to approach it:

{data=[["Fruit":"Apple","City":"Rome","PriceID":"iuchsdz","Currency":"EUR","Seller":"XXX","Status":"Pending"],["Fruit":"Banana","City":"Paris","PriceID":"gfnuidhgd","Currency":"EUR","Seller":"YYY","Status":"Pending"],["Fruit":"Kiwi","City":"Rome","PriceID":"87huisdu","Currency":"USD","Seller":"ZZZ","Status":"Pending"],["Fruit":"Apple","City":"London","PriceID":"gdfiohge","Currency":"EUR","Seller":"XXX","Status":"Pending"],["Fruit":"Banana","City":"Rome","PriceID":"gfdgdf","Currency":"USD","Seller":"XXX","Status":"Pending"],["Fruit":"Mango","City":"Madrid","PriceID":"gherhg","Currency":"EUR","Seller":"ZZZ","Status":"Pending"],["Fruit":"Orange","City":"Berlin","PriceID":"htrhr","Currency":"EUR","Seller":"YYY","Status":"Pending"]]}

Get all the sellers:
{sellers=unique(map(data, item -> item.Seller))}
{=sellers}

Now iterate through the sellers:

{repeat: for seller in sellers}
Seller: {=seller}
{sellers_data=filter(data, item -> item.Seller = seller)}
{repeat: for item in sellers_data}
Fruit: {=item.Fruit}, City; {=item.City}, Price ID: {=item.PriceID}{endrepeat}
{endrepeat}

Hope this helps!

1 Like

Thx Scott, this works great :pray: