var.isObject

bool isObject() @property const nothrow @nogc pure @safe

Check if this value is an object/map (Type.OBJECT).

More readable alternative to v.type == var.Type.OBJECT.

Returns

true if the value is an object, false otherwise.

Examples

var obj;
obj["key"] = "value";
assert(obj.isObject);
var i = 42;
assert(!i.isObject);