result.title
が動作しません。
var title = JSON.parse(result).appnews.newsitems[0].title;
:
title
プロパティを取得するには
{
"appnews": {
"appid": 380600,
"newsitems": [
{
"gid": "2175660043472720797",
"title": "QuestionsAnswers",
"url": "http://store.steampowered.com/news/externalpost/steam_community_announcements/2175660043472720797",
"is_external_url": true,
"author": "Olcha",
"contents": "1.\"What is the garage icon for at the bottom of the Inventory page? Will this be for boat access and when can we expect boats to be launched?\" That’s right - the Garage will soon be the place from where you can access Boats. That’s exactly what we are currently working hard on and we plan to release this feature in the nearest future. Actually, we’ll share a video with you guys next week! Make sure to keep track of our news - it’ll be fun! 2. \"Will we see traditional carp fishing features such a...",
"feedlabel": "Community Announcements",
"date": 1506799022,
"feedname": "steam_community_announcements",
"feed_type": 1,
"appid": 380600
}
]
,
"count": 277
}
}
、あなたはこのような何かをする必要があります:title
プロパティは、title
値を得るためにそれを反復処理する必要があるので、アレイ内にあります
newsitemsは配列なので、1つ以上の配列を返す場合はiteratingを行う必要があります。
具体的にしてください。コードの投稿:リクエストの作成方法、発生したエラー、例外の発生、実際の "レスポンス"十分な情報を提供していないと、私たちはお手伝いできません。 –
あなたの質問に[ask]と[edit](https://stackoverflow.com/posts/46573858/edit)を確認し、問題を示す[mcve]を含めてください。 – jmoerdyk