I'm trying to fetch the values from a sharepoint list view and display it in a table dynamically. In doing so, I require both the column internal names to fetch the items from the list and column display name to set the header of the table.
I'm able to fetch the internal names of the columns in that list view using below code
await sp.web.lists.getByTitle(listName).views.getByTitle(viewName).get().then(async (data: any) => {});
Using the internal names, I'm able to fetch the records from that list as well. The only thing remaining now is, how do I fetch the column display names so, that I can set those value in the header of the table? Can I do it using the already fetched internal names?
