How to decode a JSON string?

后端 未结 4 616
名媛妹妹
名媛妹妹 2021-01-21 10:39

On the server side do I have 2 hashes I encode into JSON strings like so

my $j = JSON->new;
$j = $j->utf8;

my $data;
$data->{users}  = $j->encode(\\         


        
4条回答
  •  失恋的感觉
    2021-01-21 11:22

    you can use for in statement

    var index = 0;
    for(user in users){
      result += '' + index + '' + user['fn'] + '\n';
    index++;
    }
    

提交回复
热议问题