The JSON looks like this:
"awards": [
"awardsAtLevel": {
"1": "Gold",
"3": "Gold",
"5": "Gold",
"7": "Gold"
}
]
so I'd assume I should just use the bracket syntax:
...awards.awardsAtLevel["1"]
But this doesn't get the data.
My full array looks like so:
{
"data": [
{
"awards": [
"awardsAtLevel": {
"1": "Gold",
...
}
]
}
]
}
I've tried:
...awardsAtLevel["1"].text
as well, but this doesn't work either.
awards.awardsAtLevel
does print the entire array.
The context is I'm getting data to make a b-table in bootstrap vue:
<template v-slot:cell(dmg)="rewards">
{{rewards.item.awards.awardsAtLevel["1"] && rewards.item.awards.awardsAtLevel["1"] ? rewards.item.awards.awardsAtLevel["1"]: ""}}
</template>
Also, sorry if this is a common question. I couldn't find other questions where the bracket notation didn't work.