开发者

How do I get this value in an object?

I need to pull the value out of an object and am not sure how to get to it.

Here's a slimmed down version of my code. Can someone tell me how to get the color?

var object = {
 'fruit' :开发者_如何学Go { 
   apple: { 
    goldenDelicious: [
      { color: 'green' }
    ] 
   } 
  }  
 }


object.fruit.apple.goldenDelicious[0].color
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜