Create JSON with multiple JSON inside

Hi! I need some help with creating a clean JSON output containing of multiple sub-JSONs.

Here’s my setup:

I’m basically pulling in data from different Airtable tables and aggregate it to a JSON string. The setup is the same for all modules:

The output:

The actual output:

For some reason there are already escape characters added in the bundle output.

Now the main problem:
I’m trying to combine all of my JSONs into a big one, like that:

The Problem:

The JSON strings that I’m trying to import are being double/triple escaped:

I’ve already tried escaping the strings, adding them as arrays, using “Transform to JSON” and a lot more. For some reason this feels like it’s an obvious mistake, but I can’t seem to figure it out.

Does anyone have an idea? I’d really appreciate it!
Thanks!

Welcome to the Make community!

You cannot combine both “Aggregate to JSON” and “Create JSON” modules together like that.

Try using “Aggregate to JSON” followed by “Compose a string” module, manually entering the rest of the JSON in the “Compose a string” module, but mapping the output of the aggregator into it.

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.

3 Likes

I just realized that I haven’t sent the reply. Thank you so much!

The main issue was actually that make for some reason display the JSON differently when observing the output bundles and when observing the raw output.

For some reason it escapes all JSON strings in the “Download output bundle” content, which confused me. When just mapping the JSON string in another module, the JSON content get’s processed normally without escaped strings.

Thanks for your quick reply, I really appreciate it!