title: Shiny: Generating a selectInput from a list of lists goes directly to the deepest layer
body: <p>I am trying to use a heavily nested list (6 layers) as the basis to generate a series of drop down menus.   However when passing the nested list through the selectInput function the deepest layer is what the selection is made out of. Below is a simple app to reproduce the issue I am encountering. </p>
  
  <pre><code>    library(shiny)
  
      problemList &lt;- list(
        deeperList = list (
          element1 = 1,
          element2 = 2
        ),
        deeperList2 = list (
          element3 = 3,
          element4 = 4
        )
      )
  
      ui &lt;- fluidPage(
        selectInput(inputId = "dropDownMenu", label = "Drop Down Menu", choices = problemList)
      )
  
      server &lt;- function(input, output) {}
  
      shinyApp(ui = ui, server = server)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/qxS8b.png" rel="nofollow noreferrer">Image showing what is generated by the code above</a></p>
  
  <p>I am trying to make the user choose between deeperList and deeperList2 in the first drop down menu. If they choose deeperList then another dropdown menu will be generated allowing the user to choose between element1 and element2, but if they choose deeperList2 then another dropdown menu will be generated allowing the user to choose between element3 and element4.</p>