function getMatchingOption(formData, options, rootSchema) {
  var haveAllFields = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  var index = getMatchingIndex(formData, options, rootSchema, haveAllFields);
  return index === -1 ? 0 : index;
}
When merging defaults and form data, we want to merge in this specific way:
- objects are deeply merged
- arrays are merged in such a way that:
  - when the array is set in form data, only array entries set in form data
    are deeply merged; additional entries from the defaults are ignored
  - when the array is not set in form data, the default is copied over
- scalars are overwritten/set by form data