Raymond Hill has added a suite of new scriptlets for editing JSON.
These scriptlets are similar to existing JSON-related scriptlets, except these use a different syntax.
This suite also includes scriptlets for trusted filterlists which can modify values.

This update also added additional JSON-related functionality to the $replace function.

https://github.com/gorhill/uBlock/commit/b18daa53aaa7c1cbe4f6d9acb09e8a165a3562c9

#uBlockOrigin

Add `json-edit` suite of scriptlets; extend `replace=` option · gorhill/uBlock@b18daa5

Scriptlets added: - json-edit - trusted-json-edit - json-edit-xhr-response - trusted-json-edit-xhr-response - json-edit-fetch-response - trusted-json-edit-fetch-response - jsonl-edit-xhr-response -...

GitHub

For a detailed explanation of the syntax used - JSONpath - and the differences in uBlock Origin's implementation of it, see the multiline comment at https://github.com/gorhill/uBlock/blob/master/src/js/jsonpath.js#L23

#uBlockOrigin #JSONPath

uBlock/src/js/jsonpath.js at master · gorhill/uBlock

uBlock Origin - An efficient blocker for Chromium and Firefox. Fast and lean. - gorhill/uBlock

GitHub
The json-edit scriptlet, like json-prune before it, removes properties from JSON parsed with JSON.parse.
For example, example.com##+js(json-edit, .foo) would cause '{"foo":1,"bar":2}' to be parsed as {bar: 2}
Resources Library

uBlock Origin - An efficient blocker for Chromium and Firefox. Fast and lean. - gorhill/uBlock

GitHub