public function createAssoc(array $properties, array $mapping)
    {
        $values = (array) $properties[$mapping['property']];
        if (!isset($properties[$mapping['assoc']])) {
            return $values;
        }

        $keys = (array) $properties[$mapping['assoc']];
        $nulls = (array) ($properties[$mapping['assocNulls']] ?? []);

        // make sure we start with first value
        reset($values);
        $result = [];
        foreach ($keys as $key) {
            if (in_array($key, $nulls)) {
                $result[$key] = null;
            } else {
                $result[$key] = current($values);
                next($values);
            }
        }

        return $result;
    }