Code Design Data Data Browser O Version History O Back to data Debug viev homeScreen Netflix Content Visualize Data Clear table Import csv Export to csv What Movie Should You Watch On Netflix? id Type Title Country * Data Added Release Year Rating Genre Actions Add %23 enter enter text enter text enter text enter text enter te: enter text Row Find Your Show! "Comedies, Cult Movies, Edit "Esperando La Carroza" "Movie" "Argentina" "7/15/2018" 1985 "NR" International Delete Movies" "Documentaries, Edit "Lucha: Playing the Impossible" International "Movie" "Argentina" "7/15/2018" 2016 "TV-PG" Movies, Sports Delete Movies" Run "Dramas, Edit International "Movie" "Just Love" 6 7 8 010 2018 "Argentina" "1/24/2019" "TV-MA" Movinr Meir . Rage
Please explain how to get the genre list to filter and how to associate the i to the title of the movie and display it on the finish screen. You can press to view code on the top right of the screen and you can edit it by creating a remix. Thank you for you help it is due today at 12.
var nameList = getColumn("Netflix Content", "Title");
var typeList = getColumn("Netflix Content", "Type");
var typeSelection;
onEvent("typeDropdown", "click", function( ) {
typeSelection = getText("typeDropdown");
});
onEvent("startButton", "click", function( ) {
setScreen("typeScreen");
console.log("in STARTBUTTON typeSelection = "+typeSelection);
});
onEvent("toRatingButton", "click", function( ) {
setScreen("finishScreen");
console.log("typeSelection = "+typeSelection);
// for (var i = 0; i < nameList.length; i++) {
for (var i = 0; i < 25; i++) {
console.log(((" i="+i)+" "+typeSelection)+" "+ratingSelection+" "+genreSelection+"--"+typeList[i]+" "+ratingList[i]+" "+genreList[i]);
// if ((typeList[i] == typeSelection) && ((ratingList[i] == ratingSelection)) && ((genreList[i] == genreSelection)) ){
if ( (typeList[i] == typeSelection) && (ratingList[i] == ratingSelection) ){
// appendItem(filteredNameList, typeList[i]);
console.log("ADDED i="+i+" "+typeList[i]+" "+ratingList[i]+" "+genreList[i]);
appendItem(filteredTypeList, typeList[i]);
appendItem(filteredGenreList, genreList[i]);
appendItem(filteredRatingList, ratingList[i]);
// appendItem(filteredTypeList, typeList);
}
}
});
onEvent("retryButton", "click", function( ) {
setScreen("homeScreen");
console.log("filteredNameList = "+filteredNameList);
setProperty("resultOutput", "text", "Your film is: " + filteredNameList);
});
var filteredNameList = [];
var filteredTypeList = [];
var filteredGenreList = [];
var filteredRatingList = [];
//function updateScreen() {
// var index = randomNumber(0, filteredNameList.length - 1);
//}
onEvent("typeDropdown", "change", function( ) {
typeSelection = getText("typeDropdown");
console.log("Selected option: " + typeSelection);
});
Trending now
This is a popular solution!
Step by step
Solved in 2 steps