I'm having trouble getting this into the right format.
I have this:
$.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(",")
});
});
The console.log give me one line each for the exuids that match my criteria. Like this:
9a2234e4-cfc8-47da-b03a-0ed52e80f0e2
4d06e206-261b-4774-b553-6785f13cd64e
1ec1c7ea-85f4-4ba4-ab70-bf1e56cf9bd2
This works great. However, what I need is this:
[9a2234e4-cfc8-47da-b03a-0ed52e80f0e2,4d06e206-261b-4774-b553-6785f13cd64e,1ec1c7ea-85f4-4ba4-ab70-bf1e56cf9bd2]
If I uncomment out the join statement I have above, it throws an error:
Uncaught TypeError: undefined is not a function
What am I doing wrong here?