JObjectExtensions.HasValue method

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

HasValue(JObject, string)

Extension method

Gets whether a token matching the specified path exists and isn't null (or an empty string).

public static bool HasValue(this JObject obj, string path)

Parameters

obj JObject

The parent object.

path String

A String that contains a JPath expression.

Returns

true if the property exists and the value isn't null, otherwise false.