问题
I have a mongodb query and I want to update the action to denied for Sale which meets
I want to update the action to denied.
I have tried several other methods but still it is not working.
Here is my json:
{
"Sales" : [
{
"InvoiceNumber" : "Temp-ObjectID(\"5e9cb6c6ad4f2a0ef06ae159\")",
"Action" : [
"Approved"
],
"Log" : [
"Created on: 04/20/2020 42:04:04"
]
},
{
"InvoiceNumber" : "Temp-ObjectID(\"5e9cbe20287628f1cbf78fdb\")",
"Action" : [
"Approve",
"Decline",
"Edit",
"Remarks"
],
"Log" : [
"Created on: 04/20/2020 42:04:04"
]
},
{
"InvoiceNumber" : "Temp-ObjectID(\"5e9df32ffbcd19d39250c6e8\")",
"Action" : [
"Approve",
"Decline",
"Edit",
"Remarks"
],
"Log" : [
"Created on: 04/21/2020 412:04:04"
]
},
{
"InvoiceNumber" : "Temp-ObjectID(\"5e9df3bb41034effca69f86e\")",
"Action" : [
"Approve",
"Decline",
"Edit",
"Remarks"
],
"Log" : [
"Created on: 04/21/2020 412:04:04"
]
},
{
"InvoiceNumber" : "Temp-ObjectID(\"5ea173752b1baad5dfdf4023\")",
"Action" : [
"Approve",
"Decline",
"Edit",
"Remarks"
],
"Log" : [
"Created on: 04/23/2020 44:04:04"
]
}
]
}
I want to update the action to denied. I want to use array filter in it and do that.
来源:https://stackoverflow.com/questions/61424264/i-have-a-mongodb-query-and-i-want-to-update-the-action-to-denied-for-sale-which