What about something like this?:
var dofns = { "A":function(p){}, "B":function(p){} }; for (var c of items) { if (dofns[c.name]) (dofns[c.name])(c.param); else doerror(); }
@andrewg_oz started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
What about something like this?: