Not able to get the JSON value in Function node

Hello,
I am not too sure how to get a value from the previous node.
Here is the code that I have tried in the function node below

json: {
name : items.json.name_Of_Requester
}

But doing it this way leads me to the error below.
ERROR: Cannot read properties of undefined (reading ‘name_Of_Requester’) [Line 18]

Hey @ruby09,

It is hard to tell looking at your function but my first guess would be you are not looping the items, As a quick test can you try items[0].json.name_Of_Requester and see if that works?

1 Like

This worked perfectly. Thank you so much for your help!

1 Like

Hi,

Quick tip for further readers:

  • To see and understand what is the input of incoming data, use console.log(items); and open the developer console on the browser. It helps a lot.
3 Likes