How to decrease value field by 1 in PATCH call

How to decrease value field by 1 in PATCH call

Anonymous
Not applicable
390 Views
0 Replies
Message 1 of 1

How to decrease value field by 1 in PATCH call

Anonymous
Not applicable

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.

 

 

0 Likes
391 Views
0 Replies
Replies (0)