Not sure if this is helpful or relevant to what you're trying to do, but I seem to be having luck getting collections into a JSON format with the following 4 actions:
- Create Text String
- Input: Collection Variable Output: Text Variable
- Modify String
- Input: Text Variable Replace Substring: "" With string: " Output: Text Variable
- Modify String
- Input: Text Variable Replace Substring: "{ With string: { Output: Text Variable
- Modify String
- Input: Text Variable Replace Substring: }" With string: } Output: Text Variable
Once I run those 4 actions against my collection (Which I expect to be JSON already), it is a valid JSON string.
Disclaimer: My collections are coming from built in actions and Xtension actions, not repeatable form sections. However, the formatting of the string in your screenshot is the same what I'm getting, so maybe it would work for you as well.
@SanthoshKumar-R I believe that this is related to how form variables as passed to the workflow engine for interpretation. We have a similar feature request open to better handle Start Variables (form variables included), which should also fix this problem if you'd like to add your vote to it: https://nintex.uservoice.com/forums/430063-5-nintex-workflow-cloud/suggestions/39801832-improved-instance-start-data-naming.
Not sure that there is currently another way around this.
Thanks
@bsikes. Thats good idea to make the JSON proper. But the data inside the JSON is cryptic. It doesn't allow to deserialise at the other end of the API.
@butlerj thanks for the response. Its related to Task forms. But yeah, conceptually I would like to get a JSON object for the whole form which shows meaningful names for columns rather than cryptic text. Looks like there is no option at the moment.