The data being passed into the handlebars template looks like this:
a = {
x: {
name: "xavier"
},
y: {
name: "yamal"
},
}
b = {
properties: {
x: {
property: "number"
}
}
}
Handlebars template looks like this:
<div class="left-panel">
{{a.x.name}} // Prints correctly "xavier"
{{#each b.properties}}
<h4>{{@key}}</h4> // Prints correctly "x"
<h4>{{ ../a.[@key].name }}</h4> // does not print "xavier"
{{/each}}
</div>
As you can see, I want to be able to access the name
of a dict in a
using the key in b
. How can I achieve this?