Run workflow output array problems

I’m going crazy, I’ve been working on an agent that in one workflow writes long form text divided into chapters. The main workflow contains a block that runs another workflow to write all chapters. The chapters are written by the sub-workflow without errors, but the collected chapters seem to be saved into {{book}} as one very long json string instead of a proper array. So using the data therein has been a nightmare for me. I want to avoid having an LLM parsing the output of the sub-workflow into a proper array (it can be huge) - it should already be a proper array, right? Tried javascript functions, but not really getting the desired results (mostly failing execution due to format validation). I mean, I only want to assemble each chapter after another in the sequence they are in the variable, exactly as they are with three new lines after each chapter. (So I can have the sub-workflow output in the format I want (HTML or markdown))

Can someone please elucidate me?

Run workflow config:

Launch and output parameters:

Sub-workflow end block:

Looking at the output variable inside IDE:

If I open in new tab:

Hi @per,

Thanks for the post!

When you open the output in a new tab, it will display a raw stringified version of the output. You can use that output directly without running it through a Custom Function.

If you’re receiving a JSON array that has nested values from a Run Workflow block, and you’re looking to turn it into a clean HTML or markdown format, you can extract specific values using the get helper like this:
{{get myVariable “$.path.to.value”}}

Let me know what you think.