I am trying to convert click information to a JSON for storage using
$(document).click(function(e){
url = '/recordclick';
$.post(url, {'clickData':JSON.stringify(e)});
});
but it seems that the click event has one or more circular references in it because I get the error
Uncaught TypeError: Converting circular structure to JSON
Is there a way to easily convert the click event into something without circular references, that is, without manually removing each of the circular referencing properties?