Thanks, for the information, You made me thinking into the right direction.
After a while I decided to script it in javascript instead as an action:
var json=JSON.parse(runtime.globalVars.ATH_ladder);
const TextInstance = runtime.objects.ATH_txtResult.getFirstInstance();
TextInstance.text="";
var i,j;
var x=TextInstance.x;
var y=TextInstance.y;
var ti;
var maxlines=TextInstance.height/20;
var table_1=0, table_2=0, table_3=0;
for (i=0, j=0;i<maxlines;i++) {
if (json.ladder.position.length>table_1)
table_1=json.ladder.position.length;
if (json.ladder.score.length>table_2)
table_2=json.ladder.score.length;
if (json.ladder.displayname.length>table_3)
table_3=json.ladder.displayname.length;
}
ti=runtime.objects.ATH_txtMyResult.getFirstInstance();
ti.text="This game: " + json.ladder[0].position + " position. Score: " + json.ladder[0].score;
for (i=1, j=0;i<maxlines;i++) {
ti=runtime.objects.ATH_txtResult.createInstance(0,x,y+(j*20));
ti.text=" "+ json.ladder.position;
ti=runtime.objects.ATH_txtResult.createInstance(0,x+20+(table_1*10),y+(j*20));
ti.text=" " + json.ladder.score;
ti=runtime.objects.ATH_txtResult.createInstance(0,x+20+((table_2+table_1) *10),y+(j*20));
ti.text=" "+ json.ladder.displayname;
ti=runtime.objects.ATH_txtResult.createInstance(0,x+20+((table_3+table_2+table_1) *10),y+(j*20));
ti.text=" "+ json.ladder.date;
j++;
}