Pregunta de entrevista de Darwinbox

how will you detect a loop in json object in Javascript