SelectToken Method (path, errorWhenNoMatch)

Json.NET

Json.NET - Quick Starts & API Documentation SelectToken Method (path, errorWhenNoMatch)
NamespacesNewtonsoft.Json.LinqJTokenSelectToken(String, Boolean)
Selects the token that matches the object path.
Declaration Syntax
C# Visual Basic Visual C++
public JToken SelectToken(
	string path,
	bool errorWhenNoMatch
)
Public Function SelectToken ( _
	path As String, _
	errorWhenNoMatch As Boolean _
) As JToken
public:
JToken^ SelectToken(
	String^ path, 
	bool errorWhenNoMatch
)
Parameters
path (String)
The object path from the current JToken to the JToken to be returned. This must be a string of property names or array indexes separated by periods, such as
CopyC#
Tables[0].DefaultView[0].Price
in C# or
CopyC#
Tables(0).DefaultView(0).Price
in Visual Basic.
errorWhenNoMatch (Boolean)
A flag to indicate whether an error should be thrown if no token is found.
Return Value
The JToken that matches the object path.

Assembly: Newtonsoft.Json (Module: Newtonsoft.Json) Version: 4.0.2.0 (4.0.2.13623)