I'm using a for loop to get results in JSON but i'm having a problem getting some objects...
The code that i'm using is below:
This will get all the images in zip format but i want the mp4 videos.
Here is the JSON query:
I want to be able print with document.write the mp4 video links...
The code that i'm using is below:
Code:
for (var key in myObj) {
if (myObj.hasOwnProperty(key)) {
var trailers = myObj[key].imagesZip;
document.write(''+ trailers +'\n');
}
}
Here is the JSON query:
Code:
[{"sceneId":"325025","sceneName":"Lights","Stars":"Angelina Jolly","description":"text here","length":"1660","sceneActive":"1","degrees":"180","fps":"60","imagesZip":"https:\/\/site.com\/d\/scene_files\/325025\/images-zip\/Angelina_Jolly_Trailers.zip","trailersZip":"https:\/\/site.com\/d\/scene_files\/325025\/trailers-zip\/Angelina_Jolly_Trailers.zip","trailers":{"5K":"https:\/\/site.com\/d\/scene_files\/325025\/trailer\/Angelina_Jolly_trailer_1m_5k_180_180x180_3dh_LR.mp4?disposition=attachment","Mobile":"https:\/\/site.com\/d\/scene_files\/325025\/trailer\/Angelina_Jolly_trailer_1m_mobile_180_180x180_3dh_LR.mp4?disposition=attachment","Mobile-Low":"https:\/\/site.com\/d\/scene_files\/325025\/trailer\/Angelina_Jolly_trailer_1m_mobile-low_180_180x180_3dh_LR.mp4?disposition=attachment","Oculus":"https:\/\/site.com\/d\/scene_files\/325025\/trailer\/Angelina_Jolly_trailer_1m_oculus_180_180x180_3dh_LR.mp4?disposition=attachment","PSVR":"https:\/\/site.com\/d\/scene_files\/325025\/trailer\/Angelina_Jolly_trailer_1m_psvr_180_sbs.mp4?disposition=attachment","Samsung":"https:\/\/site.com\/d\/scene_files\/325025\/trailer\/Angelina_Jolly_trailer_1m_samsung_180_180x180_3dh_LR.mp4?disposition=attachment","Streaming-High":"https:\/\/site.com\/d\/scene_files\/325025\/trailer\/Angelina_Jolly_trailer_1m_streaming_high_180_180x180_3dh_LR.mp4?disposition=attachment","Streaming-Low":"https:\/\/site.com\/d\/scene_files\/325025\/trailer\/Angelina_Jolly_trailer_1m_streaming_low_180_180x180_3dh_LR.mp4?disposition=attachment"},"posterImage":"https:\/\/site.com\/d\/scene_files\/325025\/poster-image\/1_2.jpg","releaseDate":"2020-03-31 10:00:00","url":"18vr.com\/video\/rae_of_light-325025","tags":["180","test","test","test"]},
I want to be able print with document.write the mp4 video links...