I have been using N8N for quite some time now and it has helped me out in a lot of occassions. However now I am hitting dead-end in the thinking process and hopefully someone can point me in the right direction
There are multiple endpoints that need to be called several times (each time for a different user with a different bearer token). I want to merge the user-results of each endpoint to 1 json. This way I can easily import it into my application.
How I am doing this now is:
- Get list of users with tokens from MySQL.
- Loop through those tokens and connect to the endpoint
- Write individual JSON-result to MySQL-table (I use json.stringify)
So far so good. After this process has run, I want to be able to do a GET-request to the N8N-webhook to get the combined JSON data.
- First node is MySQL-query which selects all records from the table and does a group_concat to combine them together to 1 big JSON
- Feed this info into he Respond to Webhook
The JSON is valid if I check this in a JSON validator. However N8N captures the json in an item which carries the same name as the mysql-field
How can i convert this to a regular json? Like:
If I am unclear or you need more info let me know . Thanks in advance
- n8n version:0.183.0
- Database you’re using (default: SQLite): Postgres
- Running n8n via [Docker, npm, n8n.cloud, desktop app]: Docker