Код ниже работает, я наконец-то извлекаю данные из простого списка, проблема в том, что когда я получаю столбец поиска, он показывает объект вместо значения.
var ProductInfo = '';
var listItemEnum = collListItem.getEnumerator();
var section = oListItem.get_item("Section");
while (listItemEnum.moveNext()) {
if (oListItem.get_item('Section') === 'Πειραιως Leasing'){
}
var oListItem = listItemEnum.get_current();
ProductInfo += '\n\nID: '+ oListItem.get_id() +
'<\nTitle: ' + oListItem.get_item('Title') +
'\nLink: ' + oListItem.get_item('Link') +
'<\nSection>' + oListItem.get_item('Section').get_lookupValue();
}
var value = SP.FieldLookup.get_lookupField ('Section');
console.log(value);
alert(ProductInfo.toString());
}
function onQueryFailed(sender, args) {
alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
}
</script><input type="button" value="Get Section" onclick="getSection()"/>```