sjson icon indicating copy to clipboard operation
sjson copied to clipboard

Allow modification based on specified path

Open pal-saurabh opened this issue 4 years ago • 1 comments

trying to give an example. In an array of objects, can we have support for updating one object based on specifying attribute and value of individual object in the array.

{ "attrs": [{ "name": "location", "value": "Chicago" }, { "name": "address", "value": "Magnificent Mile" }, { "name": "count", "value": "50" }] }

value, _ := sjson.Set("attrs#(name=="location")", "Lewisville")

pal-saurabh avatar Jan 26 '21 22:01 pal-saurabh

Unfortunately, this feature is currently not available.

tidwall avatar Jun 07 '21 21:06 tidwall