function restoreCompatibleValue(entity, fieldNames) {
  var path = [];
  var options = [];
  var current = entity;

  while (current) {
    path.unshift(current.data.node[fieldNames.value]);
    options.unshift(current.data.node);
    current = current.parent;
  }

  return {
    path: path,
    options: options
  };
}
/**
 * Convert entity back to path & options
 * @returns
 */
Convert entity back to path & options
@returns
Convert entity back to path & options @returns
function restoreCompatibleValue(entity, fieldNames) {
  var path = [];
  var options = [];
  var current = entity;
  while (current) {
    path.unshift(current.data.node[fieldNames.value]);
    options.unshift(current.data.node);
    current = current.parent;
  }
  return {
    path: path,
    options: options
  };
}
function restoreCompatibleValue ( entity , fieldNames ) { var path = [ ] ; var options = [ ] ; var current = entity ; while ( current ) { path . unshift ( current . data . node [ fieldNames . value ] ) ; options . unshift ( current . data . node ) ; current = current . parent ; } return { path : path , options : options } ; }
Convert entity back to path & options
 @returns
Convert entity back to path & options @returns