Document Model
Fields
a document consists of sets of fields that self describe the data it encodes each set signifies a single pair of two associated elements the name identifying the field the value that holds the data ditto document { id "123", field1 "abc", field2 1, field3 { sub field1 "xyz", sub field2 2 } } names similar to most document oriented databases, you can only use strings to encode field names in documents for complete naming rules, see docid 4y jmjedqeq0 0udncjcq if you attempt to insert a type other than a string for a field property, as demonstrated in the following snippet, you will receive an error message { 1 "numeric fields are invalid here", "this part" "numeric fields are valid here" } values field values can be encoded using various data types , including scalar type, providing flexibility in representing a wide range of information following are the data types you can use to represent information in a ditto document register map attachment each data type contains two distinct components a merge behavior and a scalar value to store (see docid\ kp b7z 3t6pzqt2wryyxm ) hierarchies in the following structure, field properties are logically grouped to provide details about a specific car this structure includes an embedded object encapsulating both the gps latitude and longitude coordinates, as well as the physical address where the car is located