cancel
Showing results for 
Search instead for 
Did you mean: 

Collection inside a collection

DennisLaursen
Level 4
I am using a REST/JSON functionality to export data to collections. But sometimes I get a collection inside a collection, and I am in doubt how to "extract" these collections. Is there a way to extract collections from collections, eventually with the "Utility - Collection Manipulation"?
15 REPLIES 15

DennisLaursen
Level 4
See attached ""Udklip"" for example

Try ""Transpose Collection""? I use this when I want to extract data when I have a collection in a collection

DennisLaursen
Level 4
Thanks, I will try that.

DennisLaursen
Level 4
Hello again. I've tried the ""Utility - Collection Manipulation --> Transpose Collection"" action stage, but it doesn't work for this issue. It throws the following, internal exception: ""Internal : Could not execute code stage because exception thrown by code stage: the change from the type 'DataTable' to the type 'String' is not valid."" (some of the exception is in Danish, so I've tried to make the most accurate translation of this) Is there any alternative ways to extract a collection located within a collection? When I look into these collections within the collection, they got different types of data (text, number, another collection and flag). Could this be a problem?

try a loop - extract the data and fix it into a new collection - if you find a collection in a collection fix it? *I don't know, throwing wild thoughts

JoakimEklund
Level 6
You can use a calculation stage. E.g [Collection1.Collection2] with Store In: [ExtractedCollection2] then do whatever with the data inside the collection of the collection.

DennisLaursen
Level 4
Hi joakimeklund Thanks for the answer. I have tried a solution with a loop, calc-stage and ""Append Rows to Collection"". And this work to extract the collections within a collection.

SagarMehta
Level 3
Hi Dennis, I am having same issue. can you please elaborate how did you fix this issue?

Anonymous
Not applicable
The looping is creating issue when the looped row contains another sub collection inside it in a column. Is there any other way to achieve this please ?