<script>
..........Your Ajax / JSON Request Sending Code
function success(response)
{
var arr = JSON.parse(response);
var selectedIds = new Array();
for(var i=0;i < arr.length ; i++)
{
selectedIds["[" + arr[i].id + "]"] ;
}
document.write(selectedIds);
}
</script>