I am collecting a list of users for each request and pushing the list of users into arrays like below:
$.each(data, function (i, item) {
jQuery.each(array, function (index, data) {
if (data.UserId == user.Id) {
//do nothing
}
});
else{
array.push(UserId:user.Id);
}
});
Then, I am sending these data to the server:
jQuery.ajax({
cache: false,
type: "GET",
url: "Handler.ashx",
contentType: "application/json; charset=utf-8",
data: { UsersData: JSON.stringify(array) },
dataType: "json"
});
Now at next time, I have to find the object as previous and to delete the users who are not presented in users list and I have to send into request. Please can any one tell me how to add the list of users into array and to delete the users from array who are not in list of users.