This is a live editor. Editting input or patch will update output instantly.
{
"firstName": "John",
"lastName": "Smith",
"age": 25,
"address": {
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
"postalCode": "10021"
},
"phoneNumber": [
{
"type": "home",
"number": "212 555-1234"
},
{
"type": "fax",
"number": "646 555-4567"
}
],
"gender": {
"type": "male"
}
}
[
{
"path": "/age",
"op": "replace",
"value": 26
},
{
"path": "/phoneNumber/1",
"op": "remove"
}
]
{
"firstName": "John",
"lastName": "Smith",
"age": 26,
"address": {
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
"postalCode": "10021"
},
"phoneNumber": [
{
"type": "home",
"number": "212 555-1234"
}
],
"gender": {
"type": "male"
}
}
output = ooPatch.apply(input, patch}).doc