Error message:

The reason for the error is that the object passed in the request has a circular reference

Solution:

var cache = [];
var str = JSON.stringify(org, function(key, value) {
    if (typeof value === 'object'&& value ! == null) {if(cache.indexOf(value) ! == -1) { // Circular reference found, discard keyreturn;
        }
        // Store value in our collection
        cache.push(value);
    }
    return value;
});
cache = null; // Enable garbage collection
Copy the code

Source: blog.csdn.net/qq_36657997…