いいのか分からなかった

didn't know whether it was okay

→ 良い
phrase Common #5,601
didn't know whether it was okay いい means “okay” or “right” here, and のか marks an indirect yes-or-no question.
JA: 彼に聞いていいのか分からなかった。
EN: I didn't know whether it was okay to ask him.

何を言っていいのか分からなかったので、彼は黙っていた。

He stayed silent because he didn’t know what to say.

トムにどう説明すればいいのか分からなかったんだ。

I didn't know how to explain it to Tom.

私達はどの車に乗ればいいのか分からなかった。

We didn't know which car we should get in.