change index js create object