How to convert a collection to JSON

I have a flow that returns a collection, which I then need to feed as a JSON parameter to another module. So far I set it up like this, but it looks like the JSON object is not produced as a result.

What can I fix?

I have the following path: Collection > Transform to String > Parse JSON

It returns an object of a type:

{
   "parameter": "value"
}

and what I need is the

{
    "graph": {
        "parameter": "value"
    }
}

so that I can later plug the JSON from “graph” into another module (without the “graph”, just the JSON)

Instead of “Transform to JSON”, try using “Compose a string”…

Then insert the desired JSON into the field:

{
    "graph": {
        "parameter": "value"
    }
}

and map the parameter variable where the value is in the string above.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

Thanks but it doesn’t work. It says " * Collection can’t be converted to text for parameter ‘value’."