Tag
You can add tags when defining elements in a layout, this permit to retrieve the javascript object instance from returned parsed layout.

Inserting a tag in a TextElement :
\{ 
"text" : \{ "tag" : "TEST" , "text" : "NAME" , "fontsize" : "12px", "color" : "#0096D6" }
}
When loading a layout you can retrieve the javascript object implemented with the tag hashtable attached to the layout :
var aMainLayout = aLayoutParser.load("./mylayout.json");
aMainLayout.tag["TEST"].element.onClick(someFunction);