Hey, I have 3 Bundles that all contain a collection.
So the Keys in each of the bundles are the same, but in each bundle is only one of the values set.
How do I combine all 3 in a single collection?
The resulting collection should look like this:
1053: L902 1902201966, L902 1902201966, L902 1902201966
I tried playing around with the aggregator and iterator, but I did not find a solution that suits me. Any help would be appreciated.
This seems like a really interesting problem to solve, I will need to review my current implementation to check if there is a better way to do this. My current implementation follows following approach,
- Aggregate the Bundle that you are getting from the previous module; which will be the array aggregator that you have shared in the screenshot.
- Iterate over the unique keys of the resultant array from aggregator, to do so, I am taking the first array index as the source assuming that all the keys are consistent throughout the bundles
- After which, Use Text Aggregator to generate a JSON, that will have the current value of key(via iterator), and then using map function alongside remove function to get value from the array that is non-null/non-empty.
- Use Parse JSON to convert the array aggregator to get the result collection
You can try this blueprint and see if this is something that you were looking for, I kinda feel there is a better way to do this, It has been a while since I worked with Make, will see if I can figure out a better approach.
blueprint (1).json (6.7 KB)
EDIT; Added Screenshot for Steps explained above
Thanks for your reply, we decided to just go with the multiple collections.
Our Scenario is going to run A LOT of times and doing it your way would increase our use of operations by a lot.
I will definetly remember your answer for any Scenarios that aren’t running as often.