app/models/imdb_api_string_request.rb
def create_show_objects
        api_response = get_shows["Search"]
        objects_array = api_response.map { |show| 
            {imdbID: show["imdbID"], title: show["Title"], show_type: show["Type"], year: show["Year"], poster: show["Poster"]} 
        }
        # cache_results(objects_array)

        # filter out game objects
        objects_array = objects_array.filter{ |show| show[:show_type] != "game" }

        p objects_array
    end
# create an object for each show in format for front end and put in an array
create an object for each show in format for front end and put in an array
create an object for each show in format for front end and put in an array
def create_show_objects
        api_response = get_shows["Search"]
        objects_array = api_response.map { |show| 
            {imdbID: show["imdbID"], title: show["Title"], show_type: show["Type"], year: show["Year"], poster: show["Poster"]} 
        }
        objects_array = objects_array.filter{ |show| show[:show_type] != "game" }
        p objects_array
    end
def create_show_objects api_response = get_shows [ "Search" ] objects_array = api_response . map { | show | { imdbID : show [ "imdbID" ] , title : show [ "Title" ] , show_type : show [ "Type" ] , year : show [ "Year" ] , poster : show [ "Poster" ] } } objects_array = objects_array . filter { | show | show [ :show_type ] != "game" } p objects_array end
create an object for each show in format for front end and put in an array
create an object for each show in format for front end and put in an array
# cache_results(objects_array) # filter out game objects