Transforms properties from array to DatasourceProperties object
968879
protected function transformProperties()
    {
        $properties = empty($this->data[static::FIELD_PROPERTIES]) ? [] : $this->data[static::FIELD_PROPERTIES];
        $this->data[static::FIELD_PROPERTIES] = new DatasourceProperties($properties);
    }
429561
public function toArray($properties = null)
    {
        $array = [];

        if (!empty($this->getMeta())) {
            $array['meta'] = $this->getMeta();
        }

        if (!empty($this->getPropertyContainer())) {
            $array['properties'] = [];

            foreach ($this->getPropertyContainer()->getProperties() as $item) {
                if (method_exists(
                    $item,
                    'toArray'
                )) {
                    $array['properties'][] = $item->toArray();
                }
            }
        }
        if (!empty($this->getDatabaseContainer())) {
            $array['database'] = $this->getDatabaseContainer()->getDatabase()->toArray();
        }

        return $array;
    }
328608
public function toArray(): array
    {
        $this->internalDataListUpdate();

        // Copied from DataObjectToArrayTrait. Do not modify here !!!
        $toArray = function($object) use (&$toArray) {
            $result = [];
            $vars = get_object_vars($object);
            foreach ($vars as $name => $value) {
                if ($name !== 'internalDataObjectData') {
                    $reflectionProperty = new \ReflectionProperty($object, $name);
                    if ($reflectionProperty->isPublic()) {
                        $result[$name] = null;
                    }
                }
            }
            if (isset($object->internalDataObjectData)) {
                foreach ($object->internalDataObjectData as $name => $value) {
                    $result[substr($name, 1)] = null;
                }
            }
            ksort($result);
            foreach ($result as $name => $null) {
                $value = $object instanceof \ArrayAccess ? $object[$name] : (isset($object->$name) ? $object->$name : null);
                if (is_object($value)) {
                    if (method_exists($value, 'toArray')) {
                        $result[$name] = $value->toArray();
                    } else {
                        if ($value instanceof \DateTime) {
                            $result[$name] = $value->format('c');
                        } else {
                            $propertyVars = $toArray($value);
                            foreach ($propertyVars as $propertyVarName => $propertyVarValue) {
                                if (is_object($propertyVarValue)) {
                                    $propertyVars[$propertyVarName] = $toArray($propertyVarValue);
                                }
                            }
                            $result[$name] = $propertyVars;
                        }
                    }
                } else {
                    $result[$name] = $value;
                }
            }
            return $result;
        };

        $result = [];
        foreach ($this->internalDataListData as $index => $object) {
            $object = $this->internalDataListUpdateValueIfNeeded($this->internalDataListData, $index);
            if (method_exists($object, 'toArray')) {
                $result[] = $object->toArray();
            } else {
                $result[] = $toArray($object);
            }
        }
        return $result;
    }
452169
public function getSourceChildPropertiesToBeConverted($source)
    {
        $gettableProperties = ObjectAccess::getGettableProperties($source);
        $propertiesToConvert = [];
        foreach ($gettableProperties as $propertyName => $gettableProperty) {
            if (is_object($gettableProperty)) {
                $propertiesToConvert[$propertyName] = $gettableProperty;
            }
        }

        return $propertiesToConvert;
    }
776328
static Properties getProperties(Instance propertiesInstance) {
        ObjectArrayDump entriesObj = (ObjectArrayDump) propertiesInstance.getValueOfField("table"); // NOI18N
        if (entriesObj != null) {
            Instance defaultsObj = (Instance) propertiesInstance.getValueOfField("defaults"); // NOI18N
            Iterator<Instance> enIt = entriesObj.getValues().iterator();
            Properties props;

            if (defaultsObj != null) {
                props = new Properties(getProperties(defaultsObj));
            } else {
                props = new Properties();
            }
            while (enIt.hasNext()) {
                Instance entry = (Instance) enIt.next();

                for (; entry != null; entry = (Instance) entry.getValueOfField("next")) { // NOI18N
                    Instance key = (Instance) entry.getValueOfField("key"); // NOI18N
                    Instance val = (Instance) entry.getValueOfField("value"); // NOI18N

                    if (key != null) {
                        props.setProperty(getString(key), getString(val));
                    }
                }
            }

            return props;
        }

        return null;
    }
1130303
function arrayToObject ( keyPath, arr ) {
    var res = {}, key, element;

    for ( var i = 0, len = arr.length; i < len; i++ ) {
        element = arr[ i ];
        key     = getOrNull( element, keyPath );
        if ( key ) res[ key ] = element;
    }
    
    return res;
}
142321
function propertyValuePairsToObject(pairs) {
  var values = {}

  pairs.forEach(function(pair) {
    values[pair[0]] = pair[1]
  })

  return values
}
872
function buildPropertyTransform(kernel, options = {}) {
    if (options.splitArrays == null)
        options.splitArrays = true;
    if (options.neverSkip == null)
        options.neverSkip = false;
    const ret = kernel;
    ret.splitArrays = options.splitArrays;
    ret.neverSkip = options.neverSkip;
    return ret;
}
1159389
protected function transformPropertiesToArray()
    {
        $properties = $this->project->getProperties();

        foreach ($properties as $propertyName => $propertyValue) {
            if (0 !== strpos($propertyName, $this->propertyPrefix . '.')) {
                continue;
            }

            list(, $mainKey, $subKey) = $this->splitPropertyName($propertyName);

            $this->addLocalConfigurationValue($mainKey, $subKey, $propertyValue);
        }
    }
957197
function convertPropertyNamesAndValues (context, pkg, map, root, waiting) {
	if(!map) {
		return map;
	}
	var clone = {}, val, name;
	for(var property in map ) {
		val = map[property];
		name = convertName(context, pkg, map, root, property, waiting); 
		val = typeof val === "object"
			? convertPropertyNamesAndValues(context, pkg, val, root, waiting)
			: convertName(context, pkg, map, root, val, waiting);
		if(typeof name !== 'undefined' && typeof val !== 'undefined') {
			clone[name] = val;
		}
	}
	return clone;
}
751519
function transformArrayData(stream, item, cb) {
    var row = [];
    if (stream.totalCount++) {
        row.push(stream.rowDelimiter);
    }
    row.push(stream.formatter(item));
    return row.join("");
}
1091449
function(properties) {
            var key, newKey,
                remapped = {},
                axisProps = this.filterPropsByRegex(properties, /(axisX|primaryAxis|axisLabelsX|axisTitleX|gridLinesX)/);
            for(key in axisProps) {
                if(axisProps.hasOwnProperty(key)) {
                    if(!this.xAxisKeyIsTrumped(key, properties)) {
                        newKey = key.replace(/(axisX|primaryAxis)/, "axis");
                        newKey = newKey.replace(/axisLabelsX/, "axisLabels");
                        newKey = newKey.replace(/axisTitleX/, "axisTitle");
                        newKey = newKey.replace(/gridLinesX/, "gridLines");
                        remapped[newKey] = axisProps[key];
                    }
                }
            }
            return remapped;
        }
954315
def transform_properties(properties, schema):
    
    new_properties = properties.copy()
    for prop_value, (prop_name, prop_type) in zip(new_properties.values(), schema["properties"].items()):
        if prop_value is None:
            continue
        elif prop_type == "time":
            new_properties[prop_name] = parse_date(prop_value).time()
        elif prop_type == "date":
            new_properties[prop_name] = parse_date(prop_value).date()
        elif prop_type == "datetime":
            new_properties[prop_name] = parse_date(prop_value)

    return new_properties
675229
function convertPatternProperties (data) {
  Object.keys(data.properties).map(function (key) {
    if (/^\/.*\/$/.test(key)) {
      data.patternProperties = data.patternProperties || {}
      const stringRegex = key.slice(1, -1)
      data.patternProperties[stringRegex] = data.properties[key]
      delete data.properties[key]
    }
  })
  return data
}
657266
def to_s
      props = {
        property: property,
        type: type,
        status: status,
        section: section
      }
      "DataCriteria#{props}"
    end
703678
function normalizeProperties(input) {
  if (!input) return;

  if (Array.isArray(input)) {
    return flatten(input).reduce(function (acc, o) {
      return Object.assign(acc, o);
    }, {});
  }

  return clone(input);
}
594873
private String[] dbdatum2StringArray(String name, DbDatum[] properties) {
        //	At first, search the array size
        //---------------------------------------
        int size = 2;    //	Object Name and nb properties
        for (DbDatum property : properties) {
            size += 2;    //	Property Name and nb properties
            size += property.size();
        }

        //	Format input parameters as strin array
        //--------------------------------------------
        String[] result;
        result = new String[size];
        result[0] = name;
        result[1] = String.valueOf(properties.length);
        for (int i = 0, pnum = 2 ; i<properties.length ; i++) {
            String[] prop = properties[i].toStringArray();
            for (String propname : prop)
                result[pnum++] = propname;
        }
        return result;
    }