• Модуль: rest
  • Путь к файлу: ~/bitrix/modules/rest/classes/general/rest_util.php
  • Класс: CRestUtil
  • Вызов: CRestUtil::processBatchStructure
static function processBatchStructure($queryParams, $arResult, $keysCache = null)
{
	$resultQueryParams = array();

	if(is_array($queryParams))
	{
		foreach($queryParams as $key => $param)
		{
			if($keysCache === null)
			{
				$keysCache = implode('|', array_keys($arResult));
			}

			$newKey = self::processBatchElement($key, $arResult);
			if(is_array($param))
			{
				$resultQueryParams[$newKey] = self::processBatchStructure($param, $arResult, $keysCache);
			}
			else
			{
				$resultQueryParams[$newKey] = self::processBatchElement($param, $arResult, $keysCache);
			}
		}
	}

	return $resultQueryParams;
}