The quoting in your listing when composing Y() call still looks a bit strange but in your real code you have it right since it is passing data to the watch. From the error 'e.split not found' looks like the E.showMessage expects string parameter and you are passing object {'Code': '10'} such object does not have method called split. so make string out of it e.g. by passing dict.Code to it, then it should print '10'
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.
The quoting in your listing when composing Y() call still looks a bit strange but in your real code you have it right since it is passing data to the watch. From the error 'e.split not found' looks like the E.showMessage expects string parameter and you are passing object
{'Code': '10'}
such object does not have method called split. so make string out of it e.g. by passingdict.Code
to it, then it should print '10'