دعم الموقع

Hi Im currently writing a function within a programm where i would like to display a picture of an actor. since i have invalid actor ID' s and cant change the dataset im using, i need to search them by name where i recive a json object which looks somewhat like that:

{
    "page": 1,
    "results": [
        {
            "adult": false,
            "gender": 2,
            "id": 2458619,
            "known_for_department": "Acting",
            "name": "Chino 'Fats' Williams",
            "original_name": "Chino 'Fats' Williams",
            "popularity": 4.205,
            "profile_path": "/uBjys56191sxDRo8qPaBPwJpUfX.jpg",
            "known_for": [
                {
                    "adult": false,
                    "backdrop_path": "/wh4ze6klUbeichAj603OKZwY1W5.jpg",
                    "id": 218,
                    "title": "The Terminator",
                    "original_language": "en",
                    "original_title": "The Terminator",
                    "overview": "In the post-apocalyptic future, reigning tyrannical supercomputers teleport a cyborg assassin known as the \"Terminator\" back to 1984 to kill Sarah Connor, whose unborn son is destined to lead insurgents against 21st century mechanical hegemony. Meanwhile, the human-resistance movement dispatches a lone warrior to safeguard Sarah. Can he stop the virtually indestructible killing machine?",
                    "poster_path": "/hzXSE66v6KthZ8nPoLZmsi2G05j.jpg",
                    "media_type": "movie",
                    "genre_ids": [
                        28,
                        53,
                        878
                    ],
                    "popularity": 52.657,
                    "release_date": "1984-10-26",
                    "video": false,
                    "vote_average": 7.642,
                    "vote_count": 11633
                },
                {
                    "adult": false,
                    "backdrop_path": "/1T7d8EuYnpZRc3yHxqa3vipZ2DE.jpg",
                    "id": 1371,
                    "title": "Rocky III",
                    "original_language": "en",
                    "original_title": "Rocky III",
                    "overview": "Now the world champion, Rocky Balboa is living in luxury and only fighting opponents who pose no threat to him in the ring, until Clubber Lang challenges him to a bout. After taking a pounding from Lang, the humbled champ turns to former bitter rival Apollo Creed for a rematch with Lang.",
                    "poster_path": "/3avfzaUDxMieyEgGPopVvh8ABXR.jpg",
                    "media_type": "movie",
                    "genre_ids": [
                        18
                    ],
                    "popularity": 42.018,
                    "release_date": "1982-05-28",
                    "video": false,
                    "vote_average": 6.866,
                    "vote_count": 3654
                },
                {
                    "adult": false,
                    "backdrop_path": "/jOWqY02m10vDRYHhYGivgV10OtZ.jpg",
                    "id": 11814,
                    "title": "Weird Science",
                    "original_language": "en",
                    "original_title": "Weird Science",
                    "overview": "Two unpopular teenagers, Gary and Wyatt, fail at all attempts to be accepted by their peers. Their desperation to be liked leads them to \"create\" a woman via their computer. Their living and breathing creation is a gorgeous woman, Lisa, whose purpose is to boost their confidence level by putting them into situations which require Gary and Wyatt to act like men.",
                    "poster_path": "/jaEauZd2joSAKn42D83gm3S0y3F.jpg",
                    "media_type": "movie",
                    "genre_ids": [
                        35,
                        10749,
                        878
                    ],
                    "popularity": 18.433,
                    "release_date": "1985-08-01",
                    "video": false,
                    "vote_average": 6.534,
                    "vote_count": 1220
                }
            ]
        }
    ],
    "total_pages": 1,
    "total_results": 1
}

I am only interested in the profile_path but have tried for hours to access that and cant get it done. I need to utilize angular > v6.0

thanks in advance Benedict Grünberg

1 رد (على هذه الصفحة 1 من 1)

Jump to last post

Hi @bt718936, this document describes how to construct a correct path for an image.

For example, the profile_path from your output in original size:

http://image.tmdb.org/t/p/original/uBjys56191sxDRo8qPaBPwJpUfX.jpg

لم تجد الفلم أو المسلسل ؟ سجل دخولك و انشئها

عام

s ركز شريط البحث
p افتح قائمة الملف الشخصي
esc اغلق النافذة المفتوحة
? افتح نافذة اختصارات لوحة المفاتيح

على كافة صفحات الوسائط

b ارجع للخلف (او للصفحة الام عند التطبيق)
e انتقل لصفحة التعديل

على كافة صفحات موسم المسلسل

(السهم الايمن) انتقل للموسم التالي
(السهم الايسر) انتقل للموسم السابق

على كافة صفحات حلقة المسلسل

(السهم الايمن) انتقل للحلقة التالية
(السهم الايسر) انتقل للحلقة السابقة

على كافة صفحات الصور

a افتح صفحة اضافة الصورة

على كافة صفحات التعديل

t افتح محدد الترجمة
ctrl+ s ارسال النموذج

على صفحات المناقشة

n انشى نقاش جديد
w تبديل حالة المتابعة
p تبديل عام / خاص
c تبديل اغلاق / فتح
a افتح الانشطة
r رد على النقاش
l انتقل لأخر رد
ctrl+ enter أرسل رسالتك
(السهم الايمن) الصفحة التالية
(السهم الايسر) الصفحة السابقة

الاعدادات

هل تريد تقييم او اضافة هذا العنصر للقائمة؟

تسجيل الدخول