私はHttp getをAngular 2で行い、レスポンスはJSONです。しかし、私はこれをngForで使用しようとしていますが、配列ではないのでできません。JSON HttpレスポンスをAngularJSのArrayに変換する方法
JSONを角度2の配列に変換するにはどうすればよいですか?私は多くのウェブサイトで検索しましたが、効果的な方法を発見しませんでした。
編集1:
応答がそのようなものです:
{
"adult": false,
"backdrop_path": "/fCayJrkfRaCRCTh8GqN30f8oyQF.jpg",
"belongs_to_collection": null,
"budget": 63000000,
"genres": [
{
"id": 18,
"name": "Drama"
}
],
"homepage": "",
"id": 550,
"imdb_id": "tt0137523",
"original_language": "en",
"original_title": "Fight Club",
"overview": "A ticking-time-bomb insomniac and a slippery soap salesman channel primal male aggression into a shocking new form of therapy. Their concept catches on, with underground \"fight clubs\" forming in every town, until an eccentric gets in the way and ignites an out-of-control spiral toward oblivion.",
"popularity": 0.5,
"poster_path": null,
"production_companies": [
{
"name": "20th Century Fox",
"id": 25
}
],
"production_countries": [
{
"iso_3166_1": "US",
"name": "United States of America"
}
],
"release_date": "1999-10-12",
"revenue": 100853753,
"runtime": 139,
"spoken_languages": [
{
"iso_639_1": "en",
"name": "English"
}
],
"status": "Released",
"tagline": "How much can you know about yourself if you've never been in a fight?",
"title": "Fight Club",
"video": false,
"vote_average": 7.8,
"vote_count": 3439
}
応答の 'console.log'を行い、それを質問に追加してください。 – AndreaM16
@ AndreaM16編集1をチェックしてください。 –
@KodieGrantham私はAngularJS 2を使用していますが、この質問はAngularJS 1に基づいています。 –