I’m working with Vue.js and Laravel to display information based on user actions logged in a JSON array.
<table class="table table-bordered small">
<thead>
<tr>
<th width="2%">No</th>
<th width="9%">Data</th>
</tr>
</thead>
<tbody>
<tr v-for="(index,row) in records.data">
<td>@{{index+1}}</td>
<td>
@{{row.logs}}
<template v-if="">
</template>
</td>
</tr>
</tbody>
</table>
row.logs is a JSON-formatted array. Based on the code, in my webpage, it will display:
["[user1][2024-11-07 15:30:36][clicked_ready_for_pickup_email_button]",
"[user2][2024-11-07 14:50:15][other_action]"
]
I want to check if row.logs
contains an entry with [clicked_ready_for_pickup_email_button]
, and if so, display a specific section in my template. Is there any tips on how I can achieve this?