Measurement

A number, with units. Optionally converted to a ‘canonical’ unit for ease of processing.

The value stored in the document as an object with properties:

value The numeric value
units The units of the measurement

If includeCanonical is true, then this object will include the measurement converted to the canonical units, with the unit name as property name.

For example, given a length measurement with a path of "height" and using includeCanonical, a document might look like:

{
    "name": "Joe Bloggs",
    "height": {
        "value": 6,
        "units": "ft",
        "m": 1.8288
    }
}

Properties

type "measurement"
quantity Which quantity is to be measured, from the list below.
integer true is only integer amounts can be entered.
defaultUnit (optional) Which units should be used by default?
includeCanonical If true, include the value converted to the canonical units.

All the common properties are supported.

Available quantities

Quantity Units defined
"length" mm, cm, m, km, in, ft, yd, mile
"time" s, m, hr, day
"mass" g, kg, oz, lb
"temperature" degC, degF (displayed as °C and °F)

The canonical unit is the unit in bold.