title: Create array from ajax call
body: <p>I'm having trouble getting this into the right format.</p>
  
  <p>I have this:</p>
  
  <pre><code>  $.ajax({
              url: 'att_count_2.php',
              type: 'GET',
              dataType: 'JSON',
              data: allvars[0],
              success: function(data) {
  
                var export_data = [];
                $('#export').click(function() {
                   $.each(data, function (key, value) {
                   var export_data = value.exuid; 
                   console.log(export_data);
                   //var final_one = export_data.join(",")
  
                  }); 
          });
  </code></pre>
  
  <p>The console.log give me one line each for the <code>exuid</code>s that match my criteria. Like this:</p>
  
  <pre><code>9a2234e4-cfc8-47da-b03a-0ed52e80f0e2  
  4d06e206-261b-4774-b553-6785f13cd64e  
  1ec1c7ea-85f4-4ba4-ab70-bf1e56cf9bd2  
  </code></pre>
  
  <p>This works great. However, what I need is this:</p>
  
  <pre><code>[9a2234e4-cfc8-47da-b03a-0ed52e80f0e2,4d06e206-261b-4774-b553-6785f13cd64e,1ec1c7ea-85f4-4ba4-ab70-bf1e56cf9bd2]
  </code></pre>
  
  <p>If I uncomment out the <code>join</code> statement I have above, it throws an error:</p>
  
  <p><code>Uncaught TypeError: undefined is not a function</code></p>
  
  <p>What am I doing wrong here?</p>