Hi
@Mani,
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 DefinitionWhen 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
------------------------------