I return data from PHP Like that.
$return['fillable'] = [
'field_one',
'field_two',
'field_three',
'field_four',
'field_five',
];
$json = json_encode($return);
return $json;
Now in my ajax response, I want to loop fillable array.
$.ajax({
'type': "GET",
'global': false,
'dataType': 'json',
'url': "/commission-process/"+$('#token').val(),
'data': {'ajax': true},
'success': function (data) {
// how to loop my return array data.
}
});
My Question is that, I want to loop fillable array which prints like that.
field_one
field_two
field_three
field_four
field_five
Thanks.