Sure, past me! Here’s an example from your future.
Suppose you have an object or array obj
and a variable field
and you want to output the value of obj[field]
, you would use the lookup helper {{lookup obj field}}
.
The code defining the helper is simply:
function(obj, field) {
return obj && obj[field];
}