I need help with saving a JSON output coming from GPT ‘result’ to ‘set variable’ module.
This is my input for the ‘set variable’ module, exactly as it comes from the GPT ‘result’
```json
{
"name_1": "John",
"name_2": "John Doe",
"description": "This is a description.",
"question": "This is a question.",
"answer": "This is an answer.",
"job_instructions": {
"job_schedule": "This is a schedule.",
"job_requirements": "This is a requirement.",
"job_type": "This is a job type.",
"Position": "This is a position.",
"another_variable": "Variable data."
},
"job_status": "Job status.",
"additional_notes": "Additional notes."
}
I would like to save it as variables,
EX.
Name 1
John
Name 2
John Doe
Description
This is a description.....
And so on.
I tried using:
{{result__name_1}}
But it saves the entire 'result' value in the variable.
Please advise.
I get the required data using the JSON parse module. Some date, however is in the array format. Ex.
"job_instructions": {
"job_schedule": "This is a schedule.",
"job_requirements": "This is a requirement.",
"job_type": "This is a job type.",
"Position": "This is a position.",
"another_variable": "Variable data."
},
I need to save all of this data to a single variable something like this:
1.This is a schedule.
2.This is a requirement.
3.This is a job type.
4.This is a position.
5.Variable data.
What’s the best way to achieve this?
I tried the text aggregator, but the problem is, if I have multiple arrays, I need to add multiple text aggregator modules. A simple solution would be appreciated.
I don’t see any arrays, did you mix up arrays and collections?
If you want individual variables you can use the Set Multiple Variables module.
Anyway this is now a different problem. Could you please create a separate topic for this?
While it’s tempting to continue an existing thread, a more effective approach would be to start a new topic. It helps other community users to respond to your query, and keeps our space organised for everyone. If you start a new conversation you are also more likely to get help from other users. You can refer others back to a related topic by including that link in your question. Thank you for understanding and keeping our community neat and tidy.
The “New Topic” link can be found in the top-right of the header:
Thank you!
Join the Make Fans Discord server to chat with other makers!