This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Javascript | |
ResolveReferences - To resolve references in JSON object with circular references. | |
*/ | |
function ResolveReferences(json) { | |
if (typeof json === 'string') | |
json = JSON.parse(json); | |
var byid = {}, // all objects by id | |
refs = []; // references to objects that could not be resolved |
NewerOlder