I am currently working with an API that stores my Data in JSON format. While I am able to successfully load and display the entire array, I am facing challenges in displaying specific fields.
The array is located in a field:
peoples: '',
errors: ''
This is my current approach for displaying the information
<div id="table">
<li v-for="people in peoples">
{{people}}
</li>
When displayed, it looks like this:
{ "username": "example", "firstnames": "ex", "middle": "NULL", "surname": "example", "email": "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="3a5f425b574a565f7a5f425b574a565f14595557">[email protected]</a>", "picture": "", "title": "NULL", "active": 1 }
{ "username": "example", "firstnames": "ex", "middle": "NULL", "surname": "example", "email": "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f99c81989489959cb99c81989489959cd79a9694">[email protected]</a>", "picture": "", "title": "NULL", "active": 1 }
{ "username": "example", "firstnames": "ex", "middle": "NULL", "surname": "example", "email": "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="fd98859c908d9198bd98859c908d9198d39e9290">[email protected]</a>", "picture": "", "title": "NULL", "active": 1 }
{ "username": "example", "firstnames": "ex", "middle": "NULL", "surname": "example", "email": "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="3b5e435a564b575e7b5e435a564b575e15585456">[email protected]</a>", "picture": "", "title": "NULL", "active": 1 }
{ "username": "example", "firstnames": "ex", "middle": "NULL", "surname": "example", "email": "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="bbdec3dad6cbd7defbdec3dad6cbd7de95d8d4d6">[email protected]</a>", "picture": "", "title": "NULL", "active": 1 }
I have discovered that using {{people[0].username}} will display the value for a single record. However, I am looking for a way to list all usernames (regardless of array size, etc).
For example:
username123
username124
username125