のかわからなかった

didn't know whether or what

→ の
phrase Rare #24,290
didn't know whether or what Used after a question word or verb phrase in the pattern ~のか分からなかった to say that someone did not know what, whether, or how something was. 分からなかった means “didn't understand” or “didn't know.”
JA: 彼が本当に来るのかわからなかった。
EN: I didn't know whether he would really come.

どこでバスに乗ったら良いのかわからなかった

I didn't know where to catch the bus.

ジョン仕事をやめたことを妻にどう説明したらいいのかわからなかった

John didn’t know how to explain to his wife that he had quit his job.

私達はどの車に乗って良いのかわからなかった

We didn't know which car we were allowed to ride in.