I have some JSON which looks like this:
{
"data": [
{
"name": "someName",
"link": "http://somelink.com",
],
"relevantArray": [
{
"keyIWant": 42
}
],
...
}
and I get the data like this:
<li v-for="(dataVue, index) in dataList.feat" :key="index">
{{ dataVue.someName }}
{{ dataVue.link}}
{{ dataVue.??? }}
</li>
what do I write to return keyIWant - the name of the key, not the value (42)??
EDIT: I can output the JSON by writing
{{dataVue.relevantArray}}
But this returns the JSON like this:
[ { "relevantArray": keyIwant } ]
and I just can't get the relevantArray to return by itself. CodeSandbox:
Object.keys(dataVue.relevantArray[0])[0]?indexvariable holds?{{dataVue.releventArray[0].keyIwant}}