It seems like there's some fairly gnarly string operations going on in the JS LiveAPI paths.
Let's say I want to get a path from something, and prepare a path, based on what I find...
var api = new LiveAPI();
api.path = 'this_device'; //returns sth like "live_set tracks 0 devices 0"
If api.path is"live_set tracks 0 devices 0"
What I'm interested in is the device to the right of this_device. How can I unravel that result and change that 0, then add a few more things to the path, for example:"live_set tracks 0 devices 1 chains 0"
I've tried various tricks of unravelling the string and packing it together into something that I can use to set to api.path, but I keep getting errors.