Avoid both for key in object and a lot of indexOf looping