~~~~~~~~~Jquery Ajax接收2个不同的Json,马上给分?~~~~~~~
C#中产生2个Json的数据集如下
[{"id_info":"-8802630287309008314"},{"id_info":"-1295374031627735475"}]
[{"no_comm":"A01","title_comm":"通知"},
{"no_comm":"A02","title_comm":"画报"},
{"no_comm":"A03","title_comm":"生态"}]
C#如何同时返回这2个Json数据集?前台AJAX可以怎么接收?
[解决办法]
后台 返回
{
A:[{"id_info":"-8802630287309008314"},{"id_info":"-1295374031627735475"}],
B:[{"no_comm":"A01","title_comm":"通知"},
{"no_comm":"A02","title_comm":"画报"},
{"no_comm":"A03","title_comm":"生态"} ]
}
前台
$.get(url,function(data){
data.A //
data.B
})