convert result to an array
342607
function (err_toArray, array) {

			if (err_toArray) {
				return l_notifyError(clt_name, 'getPage.toArray', err_toArray, cb);
			}

			//LOG.sys('array found succces, length: ' + array.length, 'SR.DB');
			// NOTE: probably no need to check
			if (array.length === _opts.limit) {
				UTIL.safeCall(cb, null, array, array[array.length - 1]);
			} else {
				UTIL.safeCall(cb, null, array, null);
			}
		}
590530
protected function processResult($result)
    {
        $output = Helper::objectToArray($result);

        if (! is_array($output)) {
            throw new Error\Api($output);
        }

        if (isset($output['result'])) {
            return $output;
        }

        if (
            isset($output['request']) &&
            $output['request']['result'] != 1 &&
            $output['request']['result'] !== 'TRUE') {
            throw new Error\Api($output['request']['errorId'] . ' - ' . $output['request']['errorMessage']);
        }

        return $output;
    }
325287
private function groupResults()
    {
        $result = array();
        foreach ($this->nodes as $node => $component) {
            if (array_key_exists($component, $result)) {
                $result[$component][] = $node;
            } else {
                $result[$component] = array($node);
            }
        }

        return $result;
    }
399135
public static function group(array $result): array
    {
        $firstRow = current($result);
        if (empty($firstRow)) {
            return $result;
        }

        $dataKeys = array_keys($firstRow);
        $groupKey = array_shift($dataKeys);

        $rows = [];
        foreach ($result as $row) {
            $index = $row[$groupKey];
            unset($row[$groupKey]);

            $rows[$index][] = $row;
        }

        return $rows;
    }
402265
public function toArray()
    {
        $keys = $this->redis->hKeys($this->key);
        $result = array();
        foreach ($keys as $key) {
            $result[$key] = $this->offsetGet($key);
        }
        return $result;
    }
785726
public function flattenResult()
    {
        $output = [];

        $vars = (array)$this;

        foreach ($vars as $field => $value) {
            //Trim off the protected items that come in as \0*\0_name
            if (ord($field[0]) == 0) continue;

            if ($value instanceof Parameter) {
                $output[$field] = $value->flattenResult();
            } else {
                $output[$field] = $value;
            }
        }

        return $output;
    }
321828
def _to_array(value):
    """"""
    if hasattr(value, 'shape'):
        return value
    elif hasattr(value, '__len__'):
        return array(value)
    else:
        return float_(value)
313843
public function toArray(): array
    {
        return [
            'name' => $this->name,
            'text' => $this->text,
            'type' => $this->type,
            'value' => $this->value,
            'style' => $this->style,
            'confirm' => $this->confirmation,
        ];
    }
1237449
public function toArray()
    {
        $result = [];

        if (!empty($this->value)) {
            if (!empty($this->details)) {
                $parts = explode('.', $this->value);
                $result['value'] = join('.', array_slice($parts, 0, $this->details));
            } else {
                $result['value'] = $this->value;
            }
        }

        if (!empty($this->alias)) {
            $result['alias'] = $this->alias;
        }

        if (!empty($this->nickname)) {
            $result['nickname'] = $this->nickname;
        }

        if (isset($result['value']) && !isset($result['alias']) && !isset($result['nickname'])) {
            return $result['value'];
        }

        return $result;
    }
1253126
function to_array(obj) { var result, i
        result = []
        obj    = Object(obj)
        for (i = size(obj); i--;)
            if (i in obj)  result[i] = obj[i]

        return result
    }
644347
public function toArray()
    {
        $result = [];
        foreach ($this->each() as $k => $v) {
            $this->_toArray($result, $k, $v);
        }
        return $result;
    }
712514
function formatResults (results) {
  return results.map(function (r) {
    return {
      fullName: r.fullName,
      hz: r.hz,
      hzDeviation: r.hzDeviation
    }
  })
}
585974
protected function makeResult () : array
    {
        $result = [];
        $alreadyDone = [];

        $rang = 1;
        while (count($alreadyDone) < $this->_selfElection->countCandidates()) :
            $winners = $this->getWinners($alreadyDone);

            foreach ($this->_Arcs as $ArcKey => $Arcvalue) :
                foreach ($winners as $oneWinner) :
                    if ($Arcvalue['from'] === $oneWinner || $Arcvalue['to'] === $oneWinner ) :
                        unset($this->_Arcs[$ArcKey]);
                    endif;
                endforeach;
            endforeach;

            $result[$rang++] = $winners;
            $alreadyDone = array_merge($alreadyDone,$winners);
        endwhile;

        return $result;
    }
997055
function toArray() {
  const arr = [];
  for (let i = 0; i < this.length; i += 1) {
    arr.push(this[i]);
  }
  return arr;
}
1168225
public static function convertResultToArrayList(\mysqli_result $result)
    {
        $list = array();
        
        while (($row = $result->fetch_assoc()) != null)
        {
            $list[] = $row;
        }
        
        return $list;
    }
114927
public function result(array $result = null)
    {
        if (null === $result) {
            return array_reduce($this->names(), function ($carry, $feature) {
                $carry[$feature] = isset($this->preserveResult[$feature])
                    ? $this->preserveResult[$feature]
                    : $this->isActive($feature);

                return $carry;
            }, []);
        }

        // Note: Cannot using array_filter with ARRAY_FILTER_USE_KEY, because using PHP 5.5
        $result = array_intersect_key($result, array_flip($this->names()));

        $this->preserveResult = array_merge($this->preserveResult, $result);

        return $this;
    }
447847
public function toArray()
    {
        $result = array();
        foreach ($this as $key => $entity) {
            $result[$key] = $entity->toArray();
        }
        return $result;
    }