I use jQuery AJAX functionality - and I get the answer back just fine, but for some odd reason I can't parse the information inside it!
I call the following:
console.log(results); console.log(results.data);
And I get:
{"data":[{"member":"asdfasdf","status":"Invalid Email"}]} undefined
Here is my jQuery:
$.ajax({ type: "POST", url: "<?php echo Uri::base();?>ajax/add_members/organization", data: { organization_id: <?php echo $organization->id;?>, members: $('#members').val(), position: $('#position').val() } }).done(function (results) {
UPDATE: dataType: 'json', required!
source share