var data = {
"status" : 1,
"data" : {
"commodityDTO" : [{
"id" : 1,
"categoryId" : 4,
"name" : "mike1",
"stock" : 20,
"picPath" : "/Upds/Sho/2009/04/20/5534900cb9f9f",
"status" : 1,
"commodityId" : 1000501
}, {
"id" : 2,
"categoryId" : 0,
"name" : "mike2",
"stock" : 20,
"picPath" : "/Upds/Shopp/2010/01/20/5534900cb9f9f",
"status" : 1,
"commodityId" : 1001801
}],
"commoditySize" : 2,
"commodityTotal" : 0,
"categoryCount" : 0
}
}
$scope.setAPI = function(openDt,page,pageSize){
var arry = $.map((openDt),function(value,index){
return [value]
})
arry = arry.slice(1)
var arr = []
for(i = 0;i<arry.length;i++){
arr = arry[i]
}
arry = $.map((arr),function(value,index){
return [value]
})
var pagedData = arry[1].slice((page - 1) * pageSize, page * pageSize);
$scope.oa = pagedData;
}
console.log(arry[1])