ArrayToObject class
$arrayToObject
operator
Converts an array into a single document; the array must be either:
an array of two-element arrays where the first element is the field name, and the second element is the field value:
[ [ "item", "abc123"], [ "qty", 25 ] ]
or
an array of documents that contains two fields, k
and v
where:
- The
k
field contains the field name. - The
v
field contains the value of the field.
- Inheritance
-
- Object
- AggregationExpr
- Operator
- ArrayToObject
Constructors
- ArrayToObject(dynamic array)
-
Creates
$arrayToObject
operator expression
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
) → Map< String, dynamic> -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited