-7

Input:

{"_id": "1235625485","_rev": "1-jsdjsid456862"},

Output:

{"_id": "1235625485","_rev": "1-jsdjsid456862","_deleted":true},
Rajesh
  • 24,354
  • 5
  • 48
  • 79
  • 1
    Welcome to SO! SO is not a portal to get code for free. Its a portal where we help our fellow developers with their problems. This means you have to share your attempts and we will help you fix it. – Rajesh Mar 27 '18 at 05:04
  • Possible Duplicate: https://stackoverflow.com/questions/1184123/is-it-possible-to-add-dynamically-named-properties-to-javascript-object – Rajesh Mar 27 '18 at 05:09

1 Answers1

0

you dont need to replace, its just addition of property. maybe you were unable to put it correctly in words. below is example how to add property.

var a = {"_id": "1235625485","_rev": "1-jsdjsid456862"}
a._deleted = true;
console.log(a)
vinayakj
  • 5,591
  • 3
  • 28
  • 48