var.object_

var object_() @property @safe

Alias for emptyObject. Returns an empty object/map value (Type.OBJECT).

This is an alternative name that may feel more natural when creating a new object that will be populated with key-value pairs.

Returns

A new var of type Type.OBJECT with no key-value pairs.

Examples

var person = var.object_;
person["name"] = "Alice";
person["age"] = 30;
assert(person.count == 2);