I am attempting to extract the title from this JSON data:
{
"feed" {
"title" {
$t: "animals"
text: ""
}
}
}
(Please note that the JSON structure provided is for example purposes only. The complete JSON file can be accessed here)
In my template file, I currently have:
{{#each feed.title}}
<h2>{{this}}</h2>
{{/each}}
Although this code is functional, it displays both the text and the $t value. I specifically require only the $t value. I have made several attempts to isolate this information using different methods, but with no success - resulting in either invalid output or simply displaying [object object]
when removing the {#each}
loop. Some of the methods I have tried include:
{{#each feed.title.[0]}}, <h2>{{this.[0]}}</h2>, {{#each feed.title.$t}}
It seems like a simple task, but how can I accurately retrieve just the "Animals" part?