Example of using Handlebars lookup helper

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];
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)