JArrayExtensions.GetArray method

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

GetArray(JArray, int)

Extension method

Gets an instance of JArray from the item at the specified index in the array.

public static JArray GetArray(this JArray array, int index)

Parameters

array JArray

The parent array.

index int

The index of the item.

Returns

An instance of JArray .

GetArray<T>(JArray, int, Func<T, TResult>)

Extension method

Gets an array of T from the item at the specified index in the array using the specified delegate func for parsing each item in the array.

public static T[] GetArray<T>(this JArray array, int index, Func<T, TResult> func)

Type Parameters

T

Parameters

array JArray

The parent array.

index int

The index of the item.

func Func<T, TResult>

The delegate (callback method) used for parsing each item in the array.

Returns

Array of T

An array of T.

GetArray(JArray, string)

Extension method

Gets an instance of JArray from the token matching the specified path.

public static JArray GetArray(this JArray array, string path)

Parameters

array JArray

The parent array.

path String

A String that contains a JPath expression.

Returns

An instance of JArray .

GetArray<T>(JArray, string, Func<T, TResult>)

Extension method

Gets an array of T from the from the token matching the specified path in the array using the specified delegate func for parsing each item in the array.

public static T[] GetArray<T>(this JArray array, string path, Func<T, TResult> func)

Type Parameters

T

Parameters

array JArray

The parent array.

path String

A String that contains a JPath expression.

func Func<T, TResult>

The delegate (callback method) used for parsing each item in the array.

Returns

Array of T

An array of T.