for item in _input.all():
arr =
for i in range(0,20):
new_item = {
“index”: i,
“num”: i + 1,
“test”: “asdasd”
}
arr.append(new_item)
item.json.barr = arr
return _input.all()
After executing the above code, the code node will display a continuously running state.
This works in javascript. Here’s a workflow. Let me try in python as well.
If this response helped you, please click the heart to show that it is useful If this response solved your issue, mark it as the solution to help the community
Here’s a workflow with both the python version and the javascript version.
If this response helped you, please click the heart to show that it is useful If this response solved your issue, mark it as the solution to help the community