code: function flattenContext(template, ctx) {
      var arr, result = {};
  
      while ((arr = re.exec(template)) !== null) {
          if (arr[1]) {
              var value = reach(ctx, arr[1]);
              result[arr[1]] = value && value.toString();
          }
      }
  
      return result;
  }
docs: evaluates and flattens deep expressions (e.g. '/{foo.a.b}') into a single level context object: {'foo.a.b': value}
  so that it may be used by url-template library
  @param template
  @param ctx
  @return {{}}