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 7kvjcanf0gijil86o84qi 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 values can be encoded using various data types, including scalar type, providing flexibility in representing a wide range of information data types provide flexibility in representing a range of information and consist of a merge behavior plus a scalar value data types include register , map , and attachment hierarchies in the following structure, the location field property is logically grouped with details about the car, such as its make , year , and color it contains nested fields also referred to as subfields , representing both the coordinates and the address where the car is located