I have a list which has two fields. (Title,EditPermission). The EditPermission is "people and group" field. I can use the following code to compare the current user with the spuser in that field
var cName = _currentUser.get_title();
var admins = currentItem.get_item('Admins');
for (var ii = 0; ii < admins.length; ii++) {
var admin = admins[ii].get_lookupValue();
if (admin == cName) {
return true;
}
}
What I need here is suggestion to get the spgroup info while traversing and then see if user exists inside it or not.
Another point, Is there any better way to do it, like may be using CAMl query? that will result the list rows that has "Me" in "EditPermission" column.