title: Uncaught SyntaxError: Invalid flags supplied to RegExp constructor 'usuario'
body: <p>I am trying fill a table with this jquery code:</p>
  
  <pre><code>$(document).ready(function(){
      var url = "&lt;c:out value="${lista}"/&gt;";
      $.get(url, function(data){
          var json = jQuery.parseJSON(data);
          for(var item in json.usuario) {
              var row = $('&lt;tr&gt;');
              row.append('&lt;td&gt;'+json.usuario[item].login+'&lt;/td&gt;');
              row.append('&lt;td&gt;'+json.usuario[item].pnome+'&lt;/td&gt;');
              row.append('&lt;td&gt;'+json.usuario[item].unome+'&lt;/td&gt;');
              row.append('&lt;td&gt;'+json.usuario[item].email+'&lt;/td&gt;');
              row.append('&lt;td&gt; &lt;button type="button" class="btn btn-sm btn-primary" data-action="'+${editar}+'" data-target="'+json.usuario[item].id+'"&gt;Editar&lt;/button&gt; &lt;button type="button" class="btn btn-sm btn-primary" data-action="'+${remover}+'" data-target="'+json.usuario[item].id+'"&gt;Remover&lt;/button&gt; &lt;button type="button" class="btn btn-sm btn-primary" data-action="'+${grupos}+'" data-target="'+json.usuario[item].id+'"&gt;Permiss&amp;otilde;es&lt;/button&gt; &lt;/td&gt;');
              $('tbody.content').append(row);
          }
      });
  });
  </code></pre>
  
  <p>based on this json string:</p>
  
  <pre><code>{"usuario":[{"id":1,"login":"klebermo","pnome":"Kleber","unome":"Mota","email":"klebermo@gmail.com"}]}
  </code></pre>
  
  <p>but when I open the page, besides no row be added to the table, this erro is displayed in the console:</p>
  
  <pre><code>Uncaught SyntaxError: Invalid flags supplied to RegExp constructor 'usuario'
  </code></pre>
  
  <p>Anyone can tell what I am doing wrong here?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I try do the same with this other code, but face the same result:</p>
  
  <pre><code>$.each(json.usuario, function(index, item){
      var row = $('&lt;tr&gt;');
      row.append('&lt;td&gt;'+item.login+'&lt;/td&gt;');
      row.append('&lt;td&gt;'+item.pnome+'&lt;/td&gt;');
      row.append('&lt;td&gt;'+item.unome+'&lt;/td&gt;');
      row.append('&lt;td&gt;'+item.email+'&lt;/td&gt;');
      row.append('&lt;td&gt; &lt;button type="button" class="btn btn-sm btn-primary" data-action="'+${editar}+'" data-target="'+item.id+'"&gt;Editar&lt;/button&gt; &lt;button type="button" class="btn btn-sm btn-primary" data-action="'+${remover}+'" data-target="'+item.id+'"&gt;Remover&lt;/button&gt; &lt;button type="button" class="btn btn-sm btn-primary" data-action="'+${grupos}+'" data-target="'+item.id+'"&gt;Permiss&amp;otilde;es&lt;/button&gt; &lt;/td&gt;');
      $('tbody.content').append(row);
  });
  </code></pre>
  
  <p><strong>UPDATE 2</strong></p>
  
  <p>my current code is:</p>
  
  <pre><code>$(document).ready(function(){
      var url = "&lt;c:out value="${lista}"/&gt;";
      console.log("url="+url);
      $.get(url, function(data){
          console.log("data="+data);
          var json = jQuery.parseJSON( data );
          $.each(json.usuario, function(index, item){
              console.log("index="+index);
              console.log("id="+item.id);
              console.log("login="+item.login);
              console.log("pnome="+item.pnome);
              console.log("unome="+item.unome);
              console.log("email="+item.email);
  
              console.log('inserindo colunas de dados');
              var row = $('&lt;tr&gt;');
              row.append('&lt;td&gt;'+item.login+'&lt;/td&gt;');
              row.append('&lt;td&gt;'+item.pnome+'&lt;/td&gt;');
              row.append('&lt;td&gt;'+item.unome+'&lt;/td&gt;');
              row.append('&lt;td&gt;'+item.email+'&lt;/td&gt;');
  
              console.log('inserindo colunas dos botões');
              var col = $('&lt;td&gt;');
              col.append('&lt;button type="button" class="btn btn-sm btn-primary" data-action="'+${editar}+'" data-target="'+item.id+'"&gt;Editar&lt;/button&gt;');
              col.append('&lt;button type="button" class="btn btn-sm btn-primary" data-action="'+${remover}+'" data-target="'+item.id+'"&gt;Remover&lt;/button&gt;');
              col.append('&lt;button type="button" class="btn btn-sm btn-primary" data-action="'+${grupos}+'" data-target="'+item.id+'"&gt;Permiss&amp;otilde;es&lt;/button&gt;');
  
              console.log('inserindo linha na tabela');
              $('tbody.content').append(row);
          });
      });
  });
  </code></pre>
  
  <p>the output in the console is:</p>
  
  <pre><code>url=/loja/usuario/listagem.json
  data=
  {"usuario":[{"id":0,"login":"klebermo","pnome":"Kleber","unome":"Mota","email":"klebermo@gmail.com"}]}
  index=0
  id=0
  login=klebermo
  pnome=Kleber
  unome=Mota
  email=klebermo@gmail.com
  inserindo colunas de dados
  inserindo colunas dos botões
  Uncaught SyntaxError: Invalid flags supplied to RegExp constructor 'usuario' 
  </code></pre>