code: function (fieldDefinition, fieldTypePropertyName, propertyName) {
  		if (fieldTypePropertyName) {
  			if (fieldDefinition.fieldType.hasOwnProperty(fieldTypePropertyName)) {
  				if (typeof fieldDefinition.fieldType[fieldTypePropertyName] === 'object') {
  					return fieldDefinition.fieldType[fieldTypePropertyName].val;
  				} else {
  					return fieldDefinition.fieldType[fieldTypePropertyName];
  				}
  			}
  		}
  
  		if (propertyName) {
  			if (fieldDefinition.hasOwnProperty(propertyName)) {
  				if (typeof fieldDefinition[propertyName] === 'object') {
  					return fieldDefinition[propertyName].val;
  				} else {
  					return fieldDefinition[propertyName];
  				}
  			}
  		}
  
  	}
docs: Some of the values may be directly the value or could be an object with different
  addidtional properties. So to get the expected value it must be checked if the
  property is an object or not. If it is an object the real value is stored in the
  object under the property 'val'. See the json fieldDefinition.
  @param fieldDefinition The field_definition
  @param fieldTypePropertyName The name of the property. This property is under the fieldType
  @param propertyName The name of the property. This property is a sibling of fieldType
  
  Only one of the property names should be given