I think what you're looking for the the Include
parameter of SP.ClientContext.load
. Its not well documented by Microsoft but there are examples on the Web. On the MSDN page, there is a community addition at the end that talks a little about it (http://msdn.microsoft.com/en-us/library/office/dn168903(v=office.15).aspx).
var ctx = new SP.ClientContext(siteUrl);
var items = ctx.get_web().get_lists().getByTitle('Pages').getItems(new SP.CamlQuery());
ctx.load(items, "Include(Id, Title, Author)");
ctx.executeQueryAsync(function () {
var listEnumerator = items.getEnumerator();
while(listEnumerator.moveNext()) {
var page = listEnumerator.get_current();
alert(page.get_item('Title') + ' - ' + page.get_item('Author'));
}
});
EDIT
In this next sample I have added get_lookupvalue to the Author and included EncodedAbsUrl, FileDirRef, and FileRef for you to try out for the path. The one you use depends on your needs but I suspect you'll want EncodedAbsUrl or FileRef. Here is an example of what each returns:
EncodedAbsUrl: http://yourserver.com/Pages/home.aspx
FileDirRef: /Pages
FileRef: /Pages/home.aspx
var ctx = new SP.ClientContext(siteUrl);
var items = ctx.get_web().get_lists().getByTitle('Pages').getItems(new SP.CamlQuery());
ctx.load(items, "Include(Id, Title, Author, EncodedAbsUrl, FileDirRef, FileRef)");
ctx.executeQueryAsync(function () {
var listEnumerator = items.getEnumerator();
while(listEnumerator.moveNext()) {
var page = listEnumerator.get_current();
alert(page.get_item('Title') + ' - ' + page.get_item('Author').get_lookupValue() + ' - ' + page.get_item('EncodedAbsUrl') + ' - ' + page.get_item('FileDirRef') + ' - ' + page.get_item('FileRef'));
}
});