Access json value using JavaScript object notation

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

I am unable to access a json value

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


        
4条回答
  •  萌比男神i
    2021-01-28 19:09

    I'm pretty sure you can't start any object, associative array key or well anything with a non-alphanumerical character.

    Also you have 3 calls to console and only two lines of expected output? What does console.log(this) output?

提交回复
热议问题