The following is the structure of my content in MongoDB
{
partnerName: "Zumba Fitness",
supportedProducts: [
"Fitness 1.0",
"Protein Bars"
]
}
I want to modify/update the contents of supportedProducts upon a PATCH request. For example, I want to change Fitness 1.0 to Fitness 2.0
I am unsure how the request for PATCH from the client side will look like. Would be it something as following
PATCH /data/{partnerName}
Content-Type: application/json
[
{ op: "replace", path: "/supportedProducts", value: "Fitness 2.0" }
]
I have tried the above, but it did not modify the content in my database