mosog
February 26, 2024, 1:19pm
1
I’m extracting stock value with my workflow, however, the key value on the output needs to change because it contains the stock symbol (see below), however, the stock symbol can change so its necessary to change the key value so its more dynamic. How can I do that with a code node?
Please share your workflow
Share the output returned by the last node
Information on your n8n setup
**n8n version: 1.8.2
Database (Postgres):
n8n EXECUTIONS_PROCESS setting (default: own, main):
Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
Operating system:
n8n
February 26, 2024, 1:19pm
2
It looks like your topic is missing some important information. Could you provide the following if applicable.
n8n version:
Database (default: SQLite):
n8n EXECUTIONS_PROCESS setting (default: own, main):
Running n8n via (Docker, npm, n8n cloud, desktop app):
Operating system:
barn4k
February 26, 2024, 7:17pm
3
hello @mosog
If I understand you correctly, something like this should do the job
mosog
February 26, 2024, 7:40pm
4
I tried your code but this is what I got.
barn4k
February 26, 2024, 7:51pm
5
Now you don’t have body
in the node input. Remove the ending .body
from the first row of the Code node
1 Like
mosog
February 26, 2024, 8:24pm
6
That worked, thank you for helping me with this. I had tried everything I knew but I still got a lot to learn.
1 Like
system
Closed
March 4, 2024, 8:25pm
7
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.