var clientContext = new SP.ClientContext(siteUrl);
var oList = clientContext.get_web().get_lists().getByTitle('Privacy Statements');
var camlQuery = new SP.CamlQuery();
camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name="IsActive"/><Value Type="Integer">1</Value></Eq></Where><OrderBy><FieldRef Name="SortOrder"/></OrderBy></View></Query>');
this.collListItem = oList.getItems(camlQuery);
clientContext.load(collListItem);
clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
function onQuerySucceeded(sender, args) {
var listItemEnumerator = collListItem.getEnumerator();
while (listItemEnumerator.moveNext()) {
var oListItem = listItemEnumerator.get_current();
listTitle.push(oListItem.get_item('Title'));
listUrl.push(oListItem.get_item('PrivacyStatementUrls').get_url());
}
Is there anyway of getting the whole list of a column straight away instead of having to use the code above