我有以下 JSON 对象。
{"feed":[
{"news":
{"adopted_from":null,"user_id":null,"description":"this is test","id":2}
},
{"news":
{"adopted_from":null,"user_id":null,"description":"like unlike done","id":1}
}
]}
我想检索新闻的ID。我尝试了许多不同的方式(例如feed[0].news.id
, feed.news.id
, feed[[0].news.id]
)但无法访问该值。谁能帮助我如何使用 JavaScript 访问它?