Question: JAVASCRIPT PLZ Write a Function named processReleaseData that processes the following movie release data: const newReleases = [ { 'id': 70111470, 'title': 'Die Hard', 'boxart':

JAVASCRIPT PLZ

Write a Function named processReleaseData that processes the following movie release data:

const newReleases = [ { 'id': 70111470, 'title': 'Die Hard', 'boxart': 'http://cdn-0.nflximg.com/images/2891/DieHard.jpg', 'uri': 'http://api.netflix.com/catalog/titles/movies/70111470', 'rating': [4.0], 'bookmark': [], }, { 'id': 654356453, 'boxart': 'http://cdn-0.nflximg.com/images/2891/BadBoys.jpg', 'uri': 'http://api.netflix.com/catalog/titles/movies/70111470', 'rating': [5.0], 'bookmark': [{ id:432534, time:65876586 }], }, { 'title': 'The Chamber', 'boxart': 'http://cdn-0.nflximg.com/images/2891/TheChamber.jpg', 'uri': 'http://api.netflix.com/catalog/titles/movies/70111470', 'rating': [4.0], 'bookmark': [], }, { 'id': 675465, 'title': 'Fracture', 'boxart': 'http://cdn-0.nflximg.com/images/2891/Fracture.jpg', 'uri': 'http://api.netflix.com/catalog/titles/movies/70111470', 'rating': [5.0], 'bookmark': [{ id:432534, time:65876586 }], }, ];

The Function should generate an Array of Objects that contain only the id and title key/value pairs. You may assume that id, when existing, is an integer greater than 0. Here are the rules:

Keep only releases that have both id and title data present. Keep only the id and title data for each release.

EXAMPLE:

  1. processReleaseData(newReleases); // [{ id: 70111470, title: 'Die Hard'}, { id: 675465, title: 'Fracture' }];

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!