Example: Construct JSON object to update list item

Coordinator
Dec 1, 2009 at 4:32 PM

An example of how to construct a JSON object and use in updateItem()

var itemJSON = {};			//Create an empty ojbect
itemJSON["id"] = 1;			//ID of list item to update
itemJSON["Title"] = "new value";	//Set new value of Title column
var mylist = jP.Lists.setSPObject("http://www.sharejpoint.com/examples", "jpListInspectorList");	//Setup jPoint handle to SharePoint list
mylist.updateItem([itemJSON]); 		//Update list