def get_category_data(user_category, level_data_info):
    """
    Loops through the level_data list and adds the rows that match with the user selected category 
    to a new list called category_data.

    Params:
        1) user_category - This is the input received from the user.
        2) level_data_info - This is the list containing the contents level_data.

    Examples:
        category_data = get_category_data(chosen_category, level_data)
        > category_data = get_category_data("animals", level_data)
        > category_data = [...] list containing rows of information that correspond to the "animals" category.
    """
    category_data = []
    for data in level_data_info:
        if data["category"] == user_category:
            category_data.append(data)
        else:
            pass
        
    return category_data