Validate the structure of Javascript object against a defined Template