I would like to push a new username into this document’s usernames field using mongodb:
{
"_id": {
"$oid": "65e9ccf6b072820ad0a611df"
},
"chatID": "test",
" usernames": [
{
"username": "test",
"lastState": 0
},
{
"username": "test2",
"lastState": 0
}
]
}
but i have no idea how to do this properly,
1 Like
n8n
March 8, 2024, 7:51am
2
It looks like your topic is missing some important information. Could you provide the following if applicable.
n8n version:
Database (default: SQLite):
n8n EXECUTIONS_PROCESS setting (default: own, main):
Running n8n via (Docker, npm, n8n cloud, desktop app):
Operating system:
barn4k
March 8, 2024, 8:46pm
3
hello @Mohammed_Hadi
I suppose that should be done via something like this
Thanks for taking time to reply, what I did as a workaround is request the usernamea modify it (add a new username) and then update the mongodb field, since the node doest support the $push functionality.
system
Closed
June 14, 2024, 9:13am
5
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.