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 about return key and value after select? #3

Open
yufeiqi opened this issue Apr 27, 2022 · 0 comments
Open

How about return key and value after select? #3

yufeiqi opened this issue Apr 27, 2022 · 0 comments

Comments

@yufeiqi
Copy link

yufeiqi commented Apr 27, 2022

Hi

var jsonPath = "$.my.path";
var jsonDoc = JsonDocument.Parse(json);
var element = jsonDoc.SelectElement(jsonPath); //returns JsonElement
var elements = jsonDoc.SelectElements(jsonPath); //returns JsonElement.ArrayEnumerator

the elements only contain value, like ["hello", "good"], [0, 1, 2].

if I want to update some property/values in the JSON body with string.replace, it's better to return the key and value.
So I want to make an extension in a PR, but I can't submit the PR due to the permission issue.

Could you grant the permission to the user "[email protected]"? (then I can submit the commit and PR).

Thanks
Phil Yu

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

1 participant