Problem With Htable and Type 'char' does not support slicing

Hi People,

i have this bug : Type ‘char’ does not support slicing

With :

var highScores  :String =uvw.text;

//var highScores= [{"id":"28","flavor":"Amande","highscore":"175"},{"id":"25","flavor":"Macaron","highscore":"660"}];

  for( i =0;i<highScores.Length;i++)
  { 
    switch(highScores[i]["flavor"])
    {
      case "Vanille":
        highScoreVanilla =  highScores[i]["highscore"];
      break;
    case "Macaron":
        highScoreMacaron= highScores[i]["highscore"];
      break;
    case "Amande":
        highScoreAlmonds = highScores[i]["highscore"];
      break;
    }    
  }

But nothing whith :

//var highScores  :String =uvw.text;

var highScores= [{"id":"28","flavor":"Amande","highscore":"175"},{"id":"25","flavor":"Macaron","highscore":"660"}];

for( i =0;i<highScores.Length;i++)
  { 
    switch(highScores[i]["flavor"])
    {
      case "Vanille":
        highScoreVanilla =  highScores[i]["highscore"];
      break;
    case "Macaron":
        highScoreMacaron= highScores[i]["highscore"];
      break;
    case "Amande":
        highScoreAlmonds = highScores[i]["highscore"];
      break;
    }    
  }

ps uvw is a WWW www

And i’m sur that highScore = {“id”:“28”,“flavor”:“Amande”,“highscore”:“175”},{“id”:“25”,“flavor”:“Macaron”,“highscore”:“660”} tested on my server and working

Any help plz !

This is a single string: var highScores :String =uvw.text;

This is a JSON object:

var highScores= [{"id":"28","flavor":"Amande","highscore":"175"},{"id":"25","flavor":"Macaron","highscore":"660"}];

To convert a String into a JSON object you could use eval(…):

var highScores = eval('(' + uvw.text + ')');

it’s Working !
Thx MAN

People told me that eval function is weak in security !
Can we made it in another way ?