Handlebars will not allow you to concatenate strings within a template using the +
operator. You will need to create a Helper to do that. Once you have that, you can combine it with the lookup helper using a subexpression to perform the lookup:
Handlebars.registerHelper('concat', function (...args) {
return args.slice(0, -1).join('');
});
{{lookup myObject (concat "name_" myObject.id)}}
I have created a fiddle for your reference.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…