First you have to get a reference to an instance. Lets say you have one sprite called Enemy and there is only one in existence.
const enemy = runtime.objects.Enemy.getFirstInstance();
Now lets say that the sprite has a string instance value called Tag and I am going to display in the console.
console.log(enemy.instVars.Tag);