Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get all the keys and values ​​of json through wildcards #353

Open
Chaofan34 opened this issue Mar 26, 2024 · 1 comment
Open

Comments

@Chaofan34
Copy link

example
i want to use gjson.Get(jsonStr, "prefix_*"), get the value from prefix_a and prefix_b, but only get result {"a":"1"}

{
  "prefix_a": {"a": "1"},
  "prefix_b": {"b": "2"}
}
@jiyoonie9
Copy link

have you tried using the GetMany function? looks like it should do what you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants