Hi I’m a beginner with n8n and javascript. I’m trying to put variable from previous node in the code node.
I tried pasting parameter path and item path.
tried removing their curly braces, and encapsulating them in list.
nothing works. some errors I’m getting are output. Item didn’t returned properly and position error.
I’m pretty confused how to use variables in here. I tried same code with other IDE’s they run perfectly.
My usecase is to strip some part from my input. I have the code for it, but just help me use variables in code node and also guide me if there’s anything else I need to know to code in n8n.
@Jennifer_Madison , to address data in your input (which is a single item), you can use the following reference, $input.first().json.body.data. You can read more about it in Current node input.