My JavaScript function is designed to gather data from a form.
var dataUpload={};
dataUpload.p1=$('#p1').combodate('getValue'); //date
dataUpload.p2=$('#p2').combodate('getValue');//date
dataUpload.p3=$('#p3').val(); //textarea
dataUpload.p4=$('#p4').val(); //text input
dataUpload.p5=Date.now(); //date
dataUpload.p6=1; //number
dataUpload.id=Id; //number
$http.post("url of your route",data).success(function (data)
{
console.log("success");
});
On the first attempt, it triggers an error stating "Converting circular structure to json", but on subsequent attempts, the data is successfully inserted. I am puzzled by this behavior and unsure why it occurs in this manner.