In my application i want to save the data by using jQuery and Ajax.I have a WCF Service. I want to save a List of Objects by using ajax.I have tried with following code, but it
May be this one is the error:
//creating list of objects
for(var i=0;i<5;i++)
{ var MyEntity=new Object();
MyEntity.TestId =i;
MyEntity.TestId =i+"testName";
listOfObjects.push(MyEntity);
} //-------------------^--------------shouldn't it be capital M
and in the ajax function:
$.ajax({
type: "POST",
async: false,
data: {data : JSON.stringify(listOfObjects)}, //<---not quite sure about it.