Ich habe ein Objekt wie folgt aus:Extract Bildwert von einem Objekt
var obj = [
{
"id": 728,
"title": "A long day",
"images": {
"illustration": {
"title": "Preview",
"16x9": {
"1248x702": "https://example.com/image/225944d77559.jpg",
"1920x1080": "https://example.com/image/4546b05422594.jpg"
}
}
}
}
];
Ich bin seit einiger Zeit versucht, die 1920x1080
Wert zu erhalten, aber ohne Erfolg:
alert(obj[0].title); //works
alert(obj[0].images.illustration.title); // works
alert(obj[0].images.illustration.16x9.1920x1080); // doesn't work and break the code
alert(obj[0].images.illustration.'16x9'.'1920x1080'); // doesn't work and break the code
Ich brauche deine Hilfe. Was muss ich tun, um den 1920x1080-Eintrag richtig zu bekommen?