objectNodeOrNull method

JsonObject? objectNodeOrNull(
  1. String key
)

Get JsonObject or null by String key.

Throws SquintException if key is not found.

Implementation

JsonObject? objectNodeOrNull(String key) {
  final object = _byKeyOfType<JsonNode<Map<String, JsonNode>>>(key, true);

  if (object == null) {
    return null;
  }

  return JsonObject(data: object.data, key: object.key);
}