I am trying to align a javascript object, however, when I do this, we get the following error:
TypeError: value of a cyclic object
I don’t think my code contains any circular references (newServiceObject is not mentioned inside the object), so I don’t understand why I am getting this message.
I want to turn my object containing two properties and an array into one string.
var serviceName = $('#newServiceNameBox').val(); var serviceCodeElemList = $(".ServiceCodeName").map(function() { return $(this).html(); } );
The error is on the last line (JSON.Stringify ()), but I have no idea why!
source share