Skip to content

Support [=] and {=} token in json-prune series like AdGuard #3787

@piquark6046

Description

@piquark6046

Prerequisites

  • I verified that this is not a filter list issue. Report any issues with filter lists or broken website functionality in the uAssets issue tracker.
  • This is NOT a YouTube, Facebook or Twitch report. These sites MUST be reported by clicking their respective links.
  • This is not a support issue or a question. For support, questions, or help, visit /r/uBlockOrigin.
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
  • The issue is not present after disabling uBO in the browser.
  • I checked the documentation to understand that the issue I am reporting is not normal behavior.

I tried to reproduce the issue when...

  • uBO is the only extension.
  • uBO uses default lists and settings.
  • using a new, unmodified browser profile.

Description

[=] and {=} tokens are used for checking a property's value to prune a matching parent property.
https://github.com/AdguardTeam/Scriptlets/blob/master/wiki/about-scriptlets.md#-%EF%B8%8F-json-prune

A specific URL where the issue occurs.

https://map.naver.com/p?c=15.00,0,0,0,dh

Steps to Reproduce

  1. Add the following filter to your user filter:
map.naver.com##+js(json-prune-xhr-response, layers.[-].metadata.name.{=}.POI_Ads, ,propsToMatch, url:/PCWeb_Real.json)
  1. Save the changes.
  2. Visit the provided uRL.

Expected behavior

It should be works like what Its AdGuard version works.

map.naver.com#%#//scriptlet('json-prune-xhr-response', 'layers.[-].metadata.name.{=}.POI_Ads', '', '/PCWeb_Real.json')

Please note that AdGuard scriptlet (2.2.7 or higher) is required.

Actual behavior

uBO cannot understand the syntax. So, the filter does not work.

uBO version

1.65.0

Browser name and version

Firefox 142.0.1

Operating System and version

Ubuntu 25.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions