An object is a collection of named fields and values.
As a record is essentially an object with a required id field that can be created, updated, or deleted, they can be worked with in almost exactly the same way as a standalone object.
A field of an object can be of any value type, including another object or array at multiple levels of depth. This allows objects and arrays to be stored within each other in order to model complex data scenarios.
Field names
Valid field names
Similar to record IDs, field names can be constructed from ASCII characters, underscores, and numbers. To create a field name with complex characters, backticks can be used.
When you combine backticks with dotted paths for nested fields, keep any periods used to denote a nested path outside the backticks. Anything inside backticks is treated as a single literal field name, including a . inside the backticks. For definitions and concrete examples (including non-ASCII identifiers), see DEFINE FIELD.
Inside a standalone object, non-ASCII field names can also be set by using a string.
Automatically generated field names
A field created from an operation will have a field name that represents the operation(s) used to construct it.
Using AS allows these automatically calculated field names to be replaced with custom names.
Extending objects and removing fields
Two objects can be merged by using either the + operator or the object::extend() function. Any fields in the second object will be added to the first object, thereby updating any existing fields and adding new fields to those that were not present.
Fields of an object can be removed with the object::remove() function, which takes either a single string or an array of strings of the field names to remove.