Check the example below.
{
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
250,
300
]
},
{
"parameters": {
"functionCode": "return [\n {\n json: {\n date: '11 jan 2021'\n }\n },\n {\n json: {\n date: '11 fev 2021'\n }\n },\n {\n json: {\n date: '11 março 2021'\n }\n },\n {\n json: {\n date: '11 abril 2021'\n }\n },\n {\n json: {\n date: '11 maio 2021'\n },\n },\n {\n json: {\n date: '11 junho 2021'\n }\n },\n {\n json: {\n date: '11 julho 2021'\n }\n },\n {\n json: {\n date: '11 agosto 2021'\n }\n },\n {\n json: {\n date: '11 set 2021'\n }\n },\n {\n json: {\n date: '11 out 2021'\n }\n },\n {\n json: {\n date: '11 nov 2021'\n }\n },\n {\n json: {\n date: '11 dez 2021'\n }\n }\n ]"
},
"name": "Function",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
590,
300
]
},
{
"parameters": {
"functionCode": "\nconst months = {\n 'jan': 'jan',\n 'fev': 'Feb',\n 'março': 'Mar',\n 'abril': 'Apr',\n 'maio': 'May',\n 'junho': 'June',\n 'julho': 'July',\n 'agosto': 'Aug',\n 'set': 'Sept',\n 'out': 'Oct',\n 'nov': 'Nov',\n 'dez': 'Dec',\n}\n\nfor (const key of Object.keys(months)) {\n if (item.date.includes(key)) {\n item.newData = item.date.replace(key, months[key])\n }\n}\n\nreturn item\n\n\n//jan.\tfev.\tmarço\tabril\tmaio\tjunho\tjulho\tagosto\tset.\tout.\tnov.\tdez.\n//Jan.\tFeb.\tMar.\tApr.\tMay\tJune\tJuly\tAug.\tSept.\tOct.\tNov.\tDec.\n"
},
"name": "FunctionItem",
"type": "n8n-nodes-base.functionItem",
"typeVersion": 1,
"position": [
840,
300
]
}
],
"connections": {
"Start": {
"main": [
[
{
"node": "Function",
"type": "main",
"index": 0
}
]
]
},
"Function": {
"main": [
[
{
"node": "FunctionItem",
"type": "main",
"index": 0
}
]
]
}
}
}