scottptsn:
I banged together this simple example. I think it should give you enough to go on.
I banged together this simple example. I think it should give you enough to go on.
$().SPServices({
operation: "GetListItems",
async: false,
listName: "Announcements",
CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>",
completefunc: function (xData, Status) {
var mappings = {};
mappings.ows_ID = {mappedName: "ID", objectType: "Counter"};
var colName = "ows_Title";
mappings[colName] = {mappedName: 'Title', objectType: 'Text'};
var Json = $(xData.responseXML).SPFilterNode("z:row").SPXmlToJson({
mapping: mappings,
removeOws: true
});
alert(done);
}
});
M.