I fetch data from a DB that stores a unique key for every client and along with their products.
Each key represents a session and each session can have multiple products like this:
7856 Shirt
7856 Trousers
7856 Jacket
9056 Scarf
9056 Blouse
I would like to have an output that looks like this:
7856 Shirt, Trousers, Jacket
9056 Scarf, Blouse
I am a complete noob with code so if a nocode way is possible I’d prefer that. If not possible w/o code, that is fine as well.
Hi @Watsonius, based on your description you’ll need at least expressions to make this work, but it should be fairly simple. Assuming values such as 7856 and Shirt appear in their own field, something like this would do the job:
This approach uses JMESPath for the filtering inside the Set node and produces a result like this:
You might need to upgrade your desktop app to the latest available version first before this example works. I’ve only tested it on the desktop app version currently available on Get started with n8n.
Thanks. I have not come across JMESPath before but it looks like it will work. Let me try it out and will let you know.
Thanks for including an example I can play around with to figure this out.