docs: function buildArrayField (args, field, form, model, schema) {
      // array items must be single object which is the schema for an object
      // that will be repeated in the array
      assert.ok(schema.items && typeof schema.items === 'object' && !Array.isArray(schema.items), field.property+' array must have single object for items')
      // get schema for sub object
      var subSchema = schema.items    
      // get data properites from schema
      var properties = subSchema.properties
      // create lookup table of required properties
      var required = _.zipObject(subSchema.required, _.map(subSchema.required, () => true))
      // set properties for field indicating that it is a nested array of objects
      field.array = true
      field.nested = true
      // create list of sub fields for field
      field.fields = []
      // list values
      field.values = []
      // get list of sub fields from args or sub schema properties
      var subFields = Array.isArray(args.fields)
          ? args.fields
          : _.keys(properties)
      // add each sub field
      _.each(subFields, subField => {
          // if field is string then treat as property name
          if (typeof subField === 'string') {
              subField = {
                  property: subField,
              }
          }
          // require property to exist
          assert.ok(properties[subField.property], 'invalid property '+subField.property+' for '+field.property+' nested array')
          // set sub field properties based on args and schema
          buildField(_.clone(subField), subField, form, model, properties[subField.property])
          // set required flag if property required
          if (required[subField.property]) {
              subField.required = true
          }
          // set field id with 0 appended
          subField.id = subField.id + '-0'
          // set field name which includes field and sub field property and index
          subField.name = model.name+'['+field.property+'][0]['+subField.property+']'
          // add to fields
          field.fields.push(subField)
      })
  
      return field
  }