Get element of JS object with an index

后端 未结 7 1167
南方客
南方客 2021-01-30 20:43

Ok so let\'s say that I have my object

myobj = {\"A\":[\"Abe\"], \"B\":[\"Bob\"]}

and I want to get the first element out of it. As in I want i

7条回答
  •  [愿得一人]
    2021-01-30 21:22

    I Hope that will help

    $.each(myobj, function(index, value) { 
    
        console.log(myobj[index]);
    
       )};
    

提交回复
热议问题