Pathing only works for objects that are in a context, not the global space. I've been using this kludge-tastic helper as a workaround to resolve paths out of the global namespace. I'd like to not have to use it.
function _global(chunk,ctx,bodies,params){
var cur= ctx.get(params.root),
i= 0
while(true){
var param= params["p"+(i++)]
if(param === undefined)
break
cur= cur[param]||cur.get&&cur.get(param)
}
chunk.write(cur)
}
It's used like this: {#global root="foo" p0="bar" p1="baz"/}
Pathing only works for objects that are in a context, not the global space. I've been using this kludge-tastic helper as a workaround to resolve paths out of the global namespace. I'd like to not have to use it.
It's used like this:
{#global root="foo" p0="bar" p1="baz"/}
From:
makeBase({foo:{bar:{baz:77}}})