title: How to display menu items based on sessionStorage
body: <p>I'm kind of lost in which is the best way to proceed. After fetching the user data from an API, I store the user data in the sessionStorage. How can I display menu items based on roles (ie- Admin, Representative, Guest).</p>
  <p>I have a basic Bootstrap Sidebar that looks like below.</p>
  <pre><code>&lt;ul class=&quot;sidebar-nav&quot;&gt;
   &lt;li&gt;&lt;a&gt;Home&lt;/a&gt;
     &lt;ul class=&quot;sidebar-dropdown&quot;&gt;
       &lt;li&gt;Default&lt;/li&gt;
       &lt;li&gt;Reports&lt;/li&gt;
     &lt;/ul&gt;
   &lt;/li&gt;
   &lt;li&gt;&lt;a&gt;Contact&lt;/a&gt;
      &lt;ul class=&quot;sidebar-dropdown&quot;&gt;
        &lt;li&gt;Admin Contact&lt;/li&gt;
        &lt;li&gt;Contact 1&lt;/li&gt;
      &lt;/ul&gt;
   &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  <p>Should I add classes to menu items based on roles to my menu items and with a JavaScript function that runs on load display or hide menu items??</p>
  <p>Any guidance would be greatly appreciated.</p>
  <p><a href="https://jsfiddle.net/edkLpcbw/7/" rel="nofollow noreferrer">JSFIDDLE</a></p>