How to list an item used from an array only once?

I have a api which gets consumed data from an IT-supplier of licenses which we use a source for feeding our ERP-system. This works great.
But we would like to create some flow that make sure that the products is automatically created in the ERP system if case we have not created it yet (the product need to be created in the ERP-system to get written by the api).
The return from our IT-supplier has, what I think, an array called Charges. If a customer has f.eks. 10 products in return charges(0), charges(1) etc. with materialnumber and product description. This is what we need to create the product in erp.
The return in the screenshot is 103 items, that means 103 companies. Then the charges array which is the product the customer has used inside as an array I think.

What we want is the end is a list with Materialnumber and Productdescription so we can see which products is being invoiced, and if needed, we can create them from this data.

Hi @Kvh, welcome to the community :tada:

This sounds like you can use the Item Lists node here to first split out all the objects in your Charges array, then another node handling the de-duplication. Like so:

On a side note it seems you have shared a screenshot of JSON data. This is somewhat cumbersome and error-prone as it means folks have to manually type it to reproduce a problem and test possible solutions.

Going forward, perhaps you can copy your JSON data structure instead? To do so, simply switch to the JSON tab, move your mouse cursor to the data area and click the “Copy” button:

You can of course redact anything confidential before posting here on the forum, it’s just super helpful to keep the original data structure.

Thank you and please let me know if you have any questions on the above :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.