如何从响应数组获取值到ajax? 让我的回应数组
Array ( [files] => Array ( [0] => files/media_post/Hydrangeas.jpg ) [metas] => Array ( [0] => Array ( [date] => Mon, 31 Oct 2016 06:16:13 +0100 [extension] => jpg [file] => files/media_post/Hydrangeas.jpg [name] => Hydrangeas.jpg [old_name] => Hydrangeas [replaced] => [size] => 595284 [size2] => 581.33 KB [type] => Array ( [0] => image [1] => jpeg ) ) ) )
和我的javascript
data: null,
type: 'POST',
enctype: 'multipart/form-data',
nama : $("#filer_input2").val(),
url: "<?php echo base_url(); ?>blog-media/ajax_add",
beforeSend: function(){},
success: function(data, el){
alert(data.metas);
var parent = el.find(".jFiler-jProgressBar").parent();
el.find(".jFiler-jProgressBar").fadeOut("slow", function(){
$("<div class=\"jFiler-item-others text-success\"><i class=\"icon-jfi-check-circle\"></i> Success</div>").hide().appendTo(parent).fadeIn("slow");
});
},
error: function(el){
var parent = el.find(".jFiler-jProgressBar").parent();
el.find(".jFiler-jProgressBar").fadeOut("slow", function(){
$("<div class=\"jFiler-item-others text-error\"><i class=\"icon-jfi-minus-circle\"></i> Error</div>").hide().appendTo(parent).fadeIn("slow");
});
}
所以我希望我可以从数组中获取值,因为我将这些值保存到数据库中。