why is ni in "kinou watashimo wakaranakatta kara, sensei ni kikimashita" the particle?


The book didn't cover a lot about ni but I know that it is used to tell what
time it is or where you are going. but nothing like this. the best explanation
I found was that it could also be used as an indirect object marker. but how
and why that works I don't understand. As said before, we didn't cover a lot
about ni. Thank you in advance




Too long for a comment so I write it as an "answer".

As you said, に can be used as an indirect object marker. For example: I write
an email to my colleague.

  1. email is the direct object
  2. colleague is the indirect object

(私は)同僚 **に** メールを書く。

As far as I know there are some "special words", which call for に as a
particle. ...聞く (to ask) or ...会う (to meet) [Perhaps someone else can extend
this list] So in your case, we have "ask the teacher". 先生に聞きました.

Note that this does not mean, that you can always use に with this "special
words" as a particle, if other rules apply. (In my opinion these cases are
very rare^^)

  1. 友達に会った。
  2. 友達と会ったのが幸いだった。

