I'm relatively new to using the Javascript API and developing web maps. I'm hoping to find a widget or sample code that allows me to create an interactive legend (table of contents) with symbology and on/off toggle for the map service layers. Even just a list of the data layers that can be toggled on/off would be great....the legend can be created separately. Does anything like this exist, or does anyone know of an example I could look at? It seems like a fairly basic need, but I've been chasing bad links and false leads trying to find it. Thanks!