I'm using a Vue.js Bootstrap table and I want to be able to collect the id of each table row into an array or object data property.
This is an example of a Bootstrap table template:
<template v-slot:cell(label)="row" > <div > <div class="label"></div> </div> </template>
So, how do I collect the values of row.item.id
into an array or object so that I can use this data for other purposes?
You can store any property in the items array into a separate array by iterating using the Array.map() method.
For example:
Then in the mounted hook: