JsonDocumentPath icon indicating copy to clipboard operation
JsonDocumentPath copied to clipboard

extend the response to accept key and value

Open yufeiqi opened this issue 3 years ago • 0 comments

extend the response to JsonElementExt, including name and value.

{ "persons": [ { "name": "John", "age": 26 }, { "name": "Jane", "age": 2 } ] }

var models = JsonDocument.Parse(json).RootElement; var results = models.SelectExtElements("persons[*].name").ToList();

the results should be [ { "Element": "John", "Name": "name" }, { "Element": "Jane", "Name": "name" } ]

yufeiqi avatar Apr 28 '22 08:04 yufeiqi