JObjectExtensions.GetObjectArray method

Version 1.1.28
.NET Framework 4.8
Namespace Skybrud.Essentials.Json.Extensions
Assembly Skybrud.Essentials.dll

GetObjectArray(JObject, string)

Extension method

Gets an array of JObject from the token matching the specified path.

public static JObject[] GetObjectArray(this JObject obj, string path)

Parameters

obj JObject

The instance of JObject .

path String

A String that contains a JPath expression.

Returns

Array of JObject

The token value as an array of JObject .

GetObjectArray<T>(JObject, string)

Extension method

Gets an array of T from the token matching the specified path.

public static T[] GetObjectArray<T>(this JObject obj, string path)

Type Parameters

T

Parameters

obj JObject

The instance of JObject .

path String

A String that contains a JPath expression.

Returns

Array of T

The token value as an array of T.

GetObjectArray<T>(JObject, string, Func<T, TResult>)

Extension method

Gets an array of T from the token matching the specified path.

public static T[] GetObjectArray<T>(this JObject obj, string path, Func<T, TResult> callback)

Type Parameters

T

Parameters

obj JObject

The instance of JObject .

path String

A String that contains a JPath expression.

callback Func<T, TResult>

The callback function for converting JObject into T.

Returns

Array of T

The token value as an array of T.