Accessing an object and Make a list with function node

Describe the issue/error/question

I am trying to iterate over a json object using the Function Node and then grab all the "value" fields and add to an array and then return that array something like

"value" : "1",
"value": "2",
"value": "3"

I dont know how can I do it , i’ve tried many things but still without success

here is what I have and the output I get

const b = []
for (let i = 0; i < items.length; i++) {

return b;

Hey @BrunoTeixeira1996, this should be doable as long as you return a valid n8n data structure. Could you confirm how exactly your source data looks like? When selecting the very first JSON line (with the open square bracket [) in your node, you can use the button in the upper right to copy the whole value (anything confidential can of course be redacted from your data):