title: Extract 'Roles' from a JWT in Javascript
body: <p>I have created a token and sent it to my client application (ReactJS).</p>
  
  <pre><code>{
    UserId: "1",
    http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name: "Unset",
    http://schemas.microsoft.com/ws/2008/06/identity/claims/role: Array(2), 
    exp: 1531116565,
    iss: "http://www.example.com", 
  …}
  </code></pre>
  
  <p>The role item looks like this:</p>
  
  <pre><code>[ {0: "User"}, {1, "Admin"} ]
  </code></pre>
  
  <p>I'm not sure why my roles item is named as a URL. But what I am trying to do is work out if the JWT indicates the user has an Admin role.</p>
  
  <p>How can I check the array of roles, for 'Admin'?</p>