Hello,
I'm attempting to generate a JSON formatted output to send to Formstack. The goal is to perform a loop to insert a field contained within a list of dictionaries. The format that works in Formstack (via the testing tab) is as follows:

I tried to produce this output using a callin.io Code step with the following code:

The output appears to be in the required format:
[ { "Id_num": "01HRWW2N752F8EV5ZZ2TZE0FEF", "Object": "1.2 Paragraph", "Content": "1.2 ParagraphnnCum explicabo voluptate At velit consequatur eos corporis consequatur in deleniti illo ut iste aliquid ut consequatur placeat sed esse voluptas. Sed expedita soluta in nihil nesciunt aut error dolorem in tempore ipsam sed adipisci quibusdam et fuga laudantium. Qui optio natus et fugiat impedit sit voluptas repellendus.nnQuo velit similique sed accusamus quos vel voluptatem perspiciatis ea obcaecati nobis 33 pariatur soluta. Sit veniam dolore qui consectetur consequatur 33 magnam perferendis qui eligendi reprehenderit ut molestiae provident ab neque galisum. Et necessitatibus praesentium non veniam itaque aut omnis enim.", "Type": "Par" }, { "Id_num": "01HRWVYY5YAJKCB7HG75HH6RDP", "Object": "1.1 Paragraph", "Content": "1.1 ParagraphnnLorem ipsum dolor sit amet. Et deserunt quidem et commodi molestias est totam odio ea vitae voluptatem eos unde impedit. 33 architecto quaerat aut architecto ducimus sit consequatur delectus ut cupiditate iste non officiis earum vel necessitatibus doloremque. Non molestiae dolores id culpa vitae et blanditiis repudiandae vel quos dolor in omnis tempora aut labore expedita ut pariatur reiciendis. Vel reprehenderit fugiat et quia dolor sit tempore rerum est aperiam placeat est dolores dolores qui magnam optio et suscipit quia.", "Type": "Par" }, { "Id_num": "01HRWVWY6P3592KTXDKVJHQF7H", "Object": "List of Chapters", "Content": "1. Chapter 1n2. Chapter 2", "Type": "Chp" }, { "Id_num": "01HRWVWMWN2AFWMVH93FEKBARW", "Object": "Table of Content", "Content": "Table of Contentnn1. Chapter 1n 1.1 Paragraphn 1.2 Paragraphnn2. Chapter 2", "Type": "ToC" } ]
However, when I execute the Formstack step 'Create Document Merge' in Formstack Documents, I receive the following error:

Do you have any suggestions? It appears the format might be incorrect, even though the code output should already be a JSON object.
The same output, when copied and pasted into the Formstack web application's test area, works correctly!
Thank you!
For anyone interested, the solution is:
Formatter by callin.io - utilities - text to line-item
And in the Formstack field map definition:
{$_input = json_decode($input, true)}{json_encode($_input)}
Thank you