Access json value using JavaScript object notation

后端 未结 4 871
囚心锁ツ
囚心锁ツ 2021-01-28 18:34

I am unable to access a json value

{\"phone\": [
{
    \"@attributes\": {
        \"type\": \"cell\",
        \"ext\": \"\"
    }
}, \"(123) 456 7890\", {
    \"         


        
4条回答
  •  情书的邮戳
    2021-01-28 19:04

    I think your phone array is quite messy because you have:

    phone[0] === {'@attributes':...}
    phone[1] === '(123) 456 7890'
    phone[2] === {'@attributes':...}
    

    Is that what you realy wanted to have there?

提交回复
热议问题