How do I get checkbox field values from d/results?
Is there an extra definition needed?
the checkbox values are returned same as the way other fields are returned, they are Boolean.. you can try below code
var item = '';
return $.ajax({
url: _spPageContextInfo.siteAbsoluteUrl + "/_api/web/lists/getbytitle('"+listName+"')/items?$select=IsClosed",
type: "GET",
data: JSON.stringify(item),
headers: {
"Accept": "application/json;odata=verbose"
}
})
.done(function(data) {
for(var i = 0;i<data.d.results.length;i++)
{
Console.log("IsClosed : "+data.d.results[i].IsClosed)
}
})
.fail(function() {
alert("error");
});
Hope this will help you.. Thanks
trueforYesandfalseforNo