Hi
@Mikky,
When you say you want to map the Collection what are you trying to do? Figure out if you can serialize a Collection straight to JSON? If so, are you using the
Utility - JSON VBO?
The action
Collection to JSON of the Utility - JSON VBO will take an input Collection and convert it to JSON. However, it treats a Collection as a JSON array of objects. In other words, every row in the Collection is looked at as a JSON object. Here's an example.
Example:
What we have below is a top-level Collection with a single field titled
SourceFiles with a field type of Collection. That Collection then has it's own definition which is two fields named
Field1 and
Field2 each with type Text.
Collection Definition![31949.png 31949.png](/t5/image/serverpage/image-id/32070iEE893546CB4F15EF/image-size/large?v=v2&px=999)
![31950.png 31950.png](/t5/image/serverpage/image-id/32072iDF4C8BC5AE2A679A/image-size/large?v=v2&px=999)
When we run this Collection through the
Collection to JSON action, we receive the following JSON as output.
[
{
"SourceFiles": [
{
"Field1": "SourceFile:Row1-Field1:Row1",
"Field2": "SourceFile:Row1-Field2 Row1"
},
{
"Field1": "SourceFile:Row1-Field1:Row2",
"Field2": "SourceFile:Row1-Field2:Row2"
}
]
}
]
Since you don't want to top-level array definition, you could always remove the top-level brackets with simple string manipulation.
Cheers,
------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------