in order to go toUsed to express the purpose of going somewhere, often followed by what is needed, how long it takes, or a difficulty. Here, の nominalizes 行く and に marks the purpose. Do not confuse this usage with のに meaning “although,” as in 行かせたのに.