I have a JSON structure that resembles the following:
{
"data": [
{
"name": "someName",
"link": "http://somelink.com",
],
"relevantArray": [
{
"keyIWant": 42
}
],
...
}
When accessing the data in my Vue component, I use the following code:
<li v-for="(dataVue, index) in dataList.feat" :key="index">
{{ dataVue.someName }}
{{ dataVue.link}}
{{ dataVue.??? }}
</li>
How can I access just the name of "keyIWant" - the key, not the value (42)?
UPDATE: I am able to display the relevant JSON by using
{{dataVue.relevantArray}}
However, this outputs the JSON in the format:
[ { "relevantArray": keyIwant } ]
and I am struggling to return just the relevantArray on its own. Check out the CodeSandbox example for more details: