I have simple JSOM script to get all the list and it's default view url but i am not getting default view url property
var context;
var lists;
// This code runs when the DOM is ready and creates a context object which is needed // to use the SharePoint object model $(document).ready(function () {
context = SP.ClientContext.get_current();
lists = context.get_web().get_lists();
context.load(lists);
context.executeQueryAsync(function () { reqSuccess(); }, function () { reqFail(); });
});
function reqSuccess() {
var listEnumerator = lists.getEnumerator();
while (listEnumerator.moveNext()) {
var list = listEnumerator.get_current();
var listTitle = list.get_title();
var listUrl = list.get_defaultViewUrl(); //Not getting this property
} }
function reqFail(sender, args) {
alert(args.get_message()); }