Message 1 of 1
How to decrease value field by 1 in PATCH call
Not applicable
07-24-2018
07:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi there
I am trying to decrease a static number by 1 by using the Json Patch call below
What I am trying to establish is to have the inventory field deducted by 1 without giving in the specific number. So basically ("inventory": CURRENT -1,) in the call below.
[
{
"_id": "xxxxxxxxxxxxxxxxxxxxx",
"propertyid": "ABC",
"servicecode": 155,
"description": "Tower of London View",
"inventory": 87,
"datemodified": "2018-07-24T00:00:00.000Z",
"timemodified": "15:28:00",
"usermodified": "Stefan",
"date": "2018-07-24T00:00:00.000Z"
}
Any input is appreciated.