How to create chart node for each item in array?

Or I guess write a complex function that basically creates a way to create a chart per device. I was afraid I already knew the answer to my question. For the sake of completeness, what I did was create switch node, that tests for the host name (from the ping node output), and sends ping return value to the appropriate chart. Anyone that knows what a case or switch statement is in C or Visual Basic .NET will understand how this works. It is not elegant, but easy to understand. Just have to remember is I change the device list, I have to change the list of chart nodes, add or remove as needed.