には

には
particle
in order to; for (someone); (contrastive) in, at, to
grammatical
1. in order to; for (doing)
After a plain verb: the purpose for which something is needed, best or hard. The main clause is an evaluation, such as 必要(ひつよう)だ, いい or 大変(たいへん)だ, not an action.
駅(えき)に行(い)くには、どうしたらいいですか。
How do I get to the station?
Exercise is the best way to lose weight.
To be able to read Japanese newspapers, you need to learn about two thousand kanji.
2. for (someone); (contrastive) in, at, to
に + は after a noun: "for" a person whose judgment or ability is meant (私(わたし)には難(むずか)しい), or に (in, at, to) made the topic, often to contrast it with something else.
It's difficult for me.
This room doesn't have a TV.
I've been to Tokyo many times, but I've never been to Osaka.

Watch out

Both には and ために express purpose, but they take different main clauses.

Common patterns