i have the following object and i am trying to convert it to json object as follows
var feeTransactionsArray=[];
$(".editor #newPayTable .mainTr").each(function(){
var feeTransactions={};
var studentDetails={};
var feeCategory={};
studentDetails['studentAdmissionId']=id;
feeCategory['feeCatId']=$(this).find('.feeCatId').val();
feeTransactions['studentDetails']=studentDetails;
feeTransactions['feeCategory']=feeCategory;
feeTransactions['paidOn']=paidDate;
feeTransactions['transReceiptNo']=receciptNumber;
feeTransactions['amountPaid']=$(this).find('.amount').val();
feeTransactions['paymentMode']=mode
feeTransactions['amountPaid']=refrenceNumber;
feeTransactions['isConcessionGiven']='no';
feeTransactionsArray.push(feeTransactionsArray);
});
var myJSON = JSON.stringify(feeTransactionsArray);
this gives following error
actions.js:1180 Uncaught TypeError: Converting circular structure to JSON
at JSON.stringify (<anonymous>)
how to solve this in my case. please help me. thank you!