JSON.parse("[" + a + "]"), b = /\}\s*?,\s*?\{/g, c = 0; null != b.exec(a) && b.lastIndex < d;) c++; alert(e[c].id)