return array(key => xxx, value => xxx)
760748
function Next()
	{
		// check the file description
		if (!$this->fd)
		{
			trigger_error("XDB::Next(), null db handler.", E_USER_WARNING);
			return false;
		}

		// Traversal the all tree
		if (!($ptr = array_pop($this->trave_stack)))
		{
			do
			{
				$this->trave_index++;
				if ($this->trave_index >= $this->hash_prime)
					break;

				$poff = $this->trave_index * 8 + 32;
				fseek($this->fd, $poff, SEEK_SET);
				$buf = fread($this->fd, 8);
				if (strlen($buf) != 8) 
				{
					$ptr = false;
					break;
				}

				$ptr = unpack('Ioff/Ilen', $buf);
			}
			while ($ptr['len'] == 0);
		}

		// end the all records?
		if (!$ptr || $ptr['len'] == 0)
			return false;

		// read the record
		$rec = $this->_tree_get_record($ptr['off'], $ptr['len']);

		// push the left & right
		if ($rec['llen'] != 0)
		{
			$left = array('off' => $rec['loff'], 'len' => $rec['llen']);
			array_push($this->trave_stack, $left);
		}
		if ($rec['rlen'] != 0)
		{
			$right = array('off' => $rec['roff'], 'len' => $rec['rlen']);
			array_push($this->trave_stack, $right);
		}

		// return value
		return $rec;
	}
828401
def [](key)
      key = CF::String.from_string(key) if key.is_a?(::String)
      self.class.check_cftype(key)
      raw = CF.CFDictionaryGetValue(self, key)
      raw.null? ? nil : self.class.typecast(raw).retain.release_on_gc
    end
19861
public function extractKeys() {
    if (!$this->hasScalarKeys()) {
      throw new \DomainException('Cannot extract non-scalar keys from array lookup ' . $this);
    }
    return array_map(function(ScalarNode $key) { return $key->toValue(); }, $this->getKeys());
  }
365297
def _get_array(data, position, obj_end, opts, element_name):
    """"""
    size = _UNPACK_INT(data[position:position + 4])[0]
    end = position + size - 1
    if data[end:end + 1] != b"\x00":
        raise InvalidBSON("bad eoo")

    position += 4
    end -= 1
    result = []

    # Avoid doing global and attribute lookups in the loop.
    append = result.append
    index = data.index
    getter = _ELEMENT_GETTER
    decoder_map = opts.type_registry._decoder_map

    while position < end:
        element_type = data[position:position + 1]
        # Just skip the keys.
        position = index(b'\x00', position) + 1
        try:
            value, position = getter[element_type](
                data, position, obj_end, opts, element_name)
        except KeyError:
            _raise_unknown_type(element_type, element_name)

        if decoder_map:
            custom_decoder = decoder_map.get(type(value))
            if custom_decoder is not None:
                value = custom_decoder(value)

        append(value)

    if position != end + 1:
        raise InvalidBSON('bad array length')
    return result, position + 1
364199
def [](input)
      key = __convert_key(input)
      return @__config.key_error.call(key) if not key?(key)

      super(key)
    end
644757
public function toArray()
    {
        $return = array();
        foreach ($this->myData as $key => $value) {
            $return[$key] = ($value instanceof CanConvertToArray) ? $value->toArray() : $value;
        }

        return $return;
    }
521671
private function simplexor()
    {
        $KeyList = array();
        $output = "";

        // Convert $Key into array of ASCII values
        for ($i = 0; $i < strlen($this->hash); $i++) {
            $KeyList[$i] = ord(substr($this->hash, $i, 1));
        }

        // Step through string a character at a time
        for ($i = 0; $i < strlen($this->data); $i++) {
            $output.= chr(ord(substr($this->data, $i, 1)) ^ ($KeyList[$i % strlen($this->hash)]));
        }

        // Return the result
        return $output;
    }
116209
public function toArrayByKey($key)
    {
        $data = [];
        if (isset($this->id)) {
            $data['id[' . $key . ']'] = $this->getId();
        }
        if (isset($this->pr)) {
            $data['pr[' . $key . ']'] = $this->getPr();
        }
        if (isset($this->no)) {
            $data['no[' . $key . ']'] = $this->getNo();
        }
        if (isset($this->de)) {
            $data['de[' . $key . ']'] = $this->getDe();
        }
        if (isset($this->it)) {
            $data['it[' . $key . ']'] = $this->getIt();
        }
        if (isset($this->va)) {
            $data['va[' . $key . ']'] = $this->getVa();
        }
        if (isset($this->sd)) {
            $data['sd[' . $key . ']'] = $this->getSd();
        }
        if (isset($this->ed)) {
            $data['ed[' . $key . ']'] = $this->getEd();
        }

        return $data;
    }
568260
public function getValues()
    {
        $return = array();
        foreach ($this->values as $k => $v) {
            $return[$k] = $this->get($k);
        }

        return $return;
    }
49969
public function arrayKeyValueFunc($key, $val, $current_array = null)
    {
        if (empty($current_array)) {
            return array($key => $val);
        }

        $current_array[$key] = $val;

        return $current_array;
    }
1293442
function getKeys(container) {
  function arrayIndex(value, i) {
    return i;
  }
  if (typeof container === 'object') {
    return Array.isArray(container) ? container.map(arrayIndex) : Object.keys(container);
  } else {
    return [];
  }
}
307955
function getAllKeys (objArray) {
  let keys = []
  _.forEach(objArray, function (row) {
    if (!row || typeof row === 'string') return
    keys = keys.concat(Object.keys(row))
  })
  return _.union(keys)
}
419377
public function toArray()
    {
        $raw = $this->dsn->toArray();
        $allKeys = array_unique(array_merge(static::$mandatoryKeys, array_keys($raw)));
        $return = [];

        foreach ($allKeys as $key) {
            if (isset($this->keyMap[$key])) {
                $key = $this->keyMap[$key];
                if (!$key) {
                    continue;
                }
            }

            $val = $this->$key;
            if ($val !== null) {
                $return[$key] = $val;
            }
        }

        return $return;
    }
1063580
def []( *key )
            if Hash === @value
                v = @value.detect { |k,| k.transform == key.first }
                v[1] if v
            elsif Array === @value
                @value.[]( *key )
            end
        end
321828
def _to_array(value):
    """"""
    if hasattr(value, 'shape'):
        return value
    elif hasattr(value, '__len__'):
        return array(value)
    else:
        return float_(value)
997143
function (key) {
            var keys = Array.isArray(key) ? key : arguments;

            var input = self.input.all();
            var results = {};

            for (var i = 0; i < keys.length; i++) {
                results[keys[i]] = input[keys[i]];
            }

            return results;
        }
1013719
public function asArray()
    {
        $array = [];

        foreach ($this as $key => $val) {
            if ($val instanceof self) {
                $val = $val->asArray();
            }
            $array[$key] = $val;
        }

        return $array;
    }