I have the following jsfiddle example (check the console) and all you will see is [object Object] instead of person data:
So, basically I have a vuejs instance and a div for v-for to iterate an object
<div id='app'>
<p v-for="person in people[0]">
<span> {{ person.name }}</span>
<i class="fa fa-check"
v-bind:data-identity="person"
@click="addDetail($event)"></i>
</p>
</div>
The problem is that if I echo {{ person }} I can see a JSON data on the page, but if I try to get it in the function addDetail() with e.target.dataset.identity then all I get is [object Object] and not the json data. I have tried JSON.parse and String methods, non of them work.
[object Object]when you try to log the object?[object Object][object Object]output