JsonPathResult Class

Represents the result of evaluating a JSONPath expression against a JSON value. Contains the ordered list of matched nodes.

Implements

Properties

NameDescription
CountGets the number of elements in the collection.

Gets the number of elements in the collection.

public int Count { get; }

Property value

int

Indexers

NameDescription
this[int]Gets the element at the specified index in the read-only list.

Gets the element at the specified index in the read-only list.

public JsonPathMatch this[int index] { get; }

Parameters

index int
The zero-based index of the element to get.

Property value

JsonPathMatch

Methods

NameDescription
GetEnumerator()Returns an enumerator that iterates through the collection.
System.Collections.IEnumerable.GetEnumerator()Returns an enumerator that iterates through a collection.
ToJsonArray()Returns the values of all matched nodes as a JsonArray.

GetEnumerator()

JsonPathResult.cs

Returns an enumerator that iterates through the collection.

public IEnumerator<JsonPathMatch> GetEnumerator()

Returns

IEnumerator<JsonPathMatch> An enumerator that can be used to iterate through the collection.

System.Collections.IEnumerable.GetEnumerator()

JsonPathResult.cs

Returns an enumerator that iterates through a collection.

IEnumerator IEnumerable.GetEnumerator()

Returns

IEnumerator An IEnumerator object that can be used to iterate through the collection.

ToJsonArray()

JsonPathResult.cs

Returns the values of all matched nodes as a JsonArray.

public JsonArray ToJsonArray()

Returns

JsonArray