Good night,
I’m not a programmer but I try to get the best out of n8n. I’m very happy with what I’ve achieved so far, but sometimes I get stuck on things that are perhaps easy and I can’t understand.
For now I need help with something that I have tried to do but have not succeeded. I need to know if the label “ENTREGA” comes on a trello card, the problem is that it can come together with others, therefore I cannot refer to the node number.
I’ve tried doing the following (based on other help I received on something similar), but to no avail.
I’m putting this in a function node:
item.etiqueta = item.labels.find(field => field.id == '60081df737fe772901150276').name;
return item;
this throws the following error: item is not defined [Line 1]
i tried making variations, however nothing works
This is my json:
[
{
"labels": [
{
"id": "60081df737fe772901150264",
"idBoard": "60081df737fe772901150244",
"name": "ENVIO",
"color": "green"
},
{
"id": "60081df737fe772901150276",
"idBoard": "60081df737fe772901150244",
"name": "ENTREGA",
"color": "orange"
}
],
"idLabels": [
"60081df737fe772901150264",
"60081df737fe772901150276"
],
}
]
Any help is very welcome.
Thank you very much!