Click or drag to resize
Json.NET

JTokenSelectToken Method (String, Boolean)

 
Selects a JToken using a JPath expression. Selects the token that matches the object path.

Namespace:  Newtonsoft.Json.Linq
Assembly:  Newtonsoft.Json (in Newtonsoft.Json.dll) Version: 12.0.1+509643a8952ce731e0207710c429ad6e67dc43db
Syntax
C#
public JToken SelectToken(
	string path,
	bool errorWhenNoMatch
)

Parameters

path
Type: SystemString
A String that contains a JPath expression.
errorWhenNoMatch
Type: SystemBoolean
A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression.

Return Value

Type: JToken
A JToken.
See Also