I have an application that reads an excel file, and displays its contents in an html table.
These elements are in an array called "AgendaItems".
There are 2 files the user can read, each is formatted with some differences. Both have 3 columns.
File 1: AgendaItem, LegistarId, Title File 2: Agenda #, File #, Title
I am able to read the file and populate the array $scope.AgendaItens with the contents of either file, depending what the user selects.
My problem is that before making these modifications to accept a second file with a different format, I used:
<td scope="row">{{ai.AgendaItem}}</td>
<td>{{ai.LegistarID}}</td>
When processing the new file, now the array contains: Agenda #, and File #, which are equivalent to AgendaItem, and LegistarID respectively.
Is there a way to, in the HTML choose which value to display? for example, if array has AgendaItem, display AgendaItem, if array has Agenda #, display Agenda #?
Or, is it possible to rename a the name of a key, from Agenda # to AgendaItem and from File # to LegistarID?
Please let me know if I need to post more details, more code in order for me to be able to get help.
Thank you in advance, Erasmo