Index value of Array

前端 未结 7 1606
眼角桃花
眼角桃花 2021-01-12 08:56

I have a json file with contents like this:

{
     \"aaa\":{
         \"status\":\"available\",
         \"classkey\":\"dotnet\"
     },
     \"bbb\":{
              


        
7条回答
  •  执笔经年
    2021-01-12 09:24

    Maybe this can solve your problem.

    Using jQuery you can convert your JSon to Array and access it by index.

    var data = $.parseJSON(msg.d ? msg.d : msg);
    alert(data[1].status)
    

提交回复
热议问题