I have api on laravel and front on vue + laravel. I am getting all the data from api and pass it to view. Now I want to do conditional rendering.
My array looks like:
"data" => array:2 [▼
0 => array:5 [▶]
1 => array:5 [▶]
I want to show div if topic from link is the same topic from array. But I do not know how to search and compare that words. So it will be like that:
v-if="$topic == this.topic"
But now I can only use
v-if="$data[]['0']['topic']"
and then I have the same topic on all my views.
My link looks like:
/user/{topic}/post
How to do it correctly guys?