const getItem = function (tree, ID) { var Deep, T, F; for (F = tree.length; F;) { T = tree[--F] if (ID == T.id) return T; if (T.children) { Deep = getDepById(T.children, ID) if (Deep) return Deep } } }
愿你的生活只有诗和远方