I have come across various resources for sorting data that is contained within an array, but I am unable to locate any information on how to sort dynamically generated data.
<table>
<thead>
<tr>
<th>Program</th>
<th>Rewards</th>
</tr>
</thead>
<tbody>
<tr v-for="program in programs" :key="program.id">
<td>{{ program.program_name }}</td>
<td>{{ pointValue(program) | percent }}</td>
</tr>
</tbody>
</table>
The pointValue() function calculates and returns a value displayed as a percentage in the Rewards column. I am interested in making the table sortable by Programs and by Rewards. (Program is simply a string).