I'm trying to pass an object with circular references from node.js server to client-side javascript.
Server (node.js):
var object = { circular: object }
//....
app.get('/', function(req, res){
res.render('index.jade', {object: object});
});
Client-side Jade/Javascript
script var object = !{JSON.stringify(object)};
Here I get the error that object
contains circular references.
Any way to get the object
in client-side javascript, with
or without
circular references?