This is an example for populating a Layer Tree from a GetCapabilities request
See the config here: Config.js