Say, I have this JSON patch, which adds something into the groups
array
[
{"op":"add","path":"/food/groups/-",
"value":{
"select" : 55,
"pool" : [
[ 0.111, "biscuit" ],
[ 0.111, "cookie" ],
[ 0.111, "pretzel" ]
]
}
}
]
I need to make a patch to this patch, that removes [ 0.111, "pretzel" ]
. Normally I can just utilize the operation remove
.
Problem is, I cannot be so sure which number that biscuit/cookie/pretzel patch will come up. I don't know if it'll be the 2nd in the array, or the 5th, because users might apply another patch that adds something into the array.
What would be the most efficient way to solve this problem, without making an exact copy of the patch but without the pretzel
?