title: dynamic menu in VB.NET
body: <p>I want to write a code that creates Menus based on user Role.</p>
  <pre><code>Dim User_Role As String = &quot;Admin&quot;
  Dim Menus As New Dictionary(Of String, Object) From {
      {&quot;Admin&quot;, { {&quot;item1&quot;, &quot;item1_icon&quot; }, {&quot;item2&quot;, &quot;item2_icon&quot;}, {&quot;item3&quot;, &quot;item3_icon&quot;} } },
      {&quot;User&quot;, { {&quot;item1&quot;, &quot;item1_icon&quot; }, {&quot;item2&quot;, &quot;item2_icon&quot;} } }
  }
  For Each menu As Object In Menus.Item(User_Role)
      'Inside this loop i need to get for example &quot;item*&quot; and &quot;item*_icon&quot; each time until all items in that user role are looped through and idk how to do it
  Next
  </code></pre>
  <p>Where i am getting things wrong?</p>
  <p><a href="https://i.stack.imgur.com/APavn.png" rel="nofollow noreferrer">Here's the expected result with &quot;Admin&quot; user</a></p>
  <p><a href="https://i.stack.imgur.com/it8VZ.png" rel="nofollow noreferrer">And this is expected result with &quot;User&quot;</a></p>