foreach ($arResult['ITEMS'] as $index => $arItem) {
$resultArray = \Bitrix\Highloadblock\HighloadBlockTable::compileEntity('Entity')->getDataClass()::getList([
'select' => ['UF_NAME'],
'filter' => ['UF_XML_ID' => $arItem['PROPERTIES']['PROP']['VALUE']],
]);
while ($rowArray = $resultObj->fetch()) {
$arResult['ITEMS'][$index]['PROPERTIES']['PROP']['UF_NAME'] = $resultArray['UF_NAME'];
}
}
$arResult['ITEMS'][$index]['PROPERTIES']['PROP']['UF_NAME']
$xmlIds = [];
foreach ($arResult['ITEMS'] as $index => $arItem) {
$xmlIds[] = $arItem['PROPERTIES']['PROP']['VALUE']];
}
$xmlIds = array_unique($xmlIds);
if(!empty($xmlIds)){
$resultArray = \Bitrix\Highloadblock\HighloadBlockTable::compileEntity('Entity')->getDataClass()::getList([
'select' => ['UF_NAME'],
'filter' => ['@UF_XML_ID' => $xmlIds],
]);
while ($rowArray = $resultObj->fetch()) {
$arRef[$resultArray['UF_XML_ID']] = $resultArray['UF_NAME'];
}
}
$arRef = [];
$resultArray = \Bitrix\Highloadblock\HighloadBlockTable::compileEntity('Entity')->getDataClass()::getList([
'select' => ['UF_NAME'],
'filter' => [],
]);
while ($rowArray = $resultObj->fetch()) {
$arRef[$resultArray['UF_XML_ID']] = $resultArray['UF_NAME'];
}
foreach ($arResult['ITEMS'] as $index => $arItem) {
$arResult['ITEMS'][$index]['PROPERTIES']['PROP']['UF_NAME'] = $arRef[$arItem['PROPERTIES']['PROP']['VALUE']];
}