A fortunate aspect or small mercy that occurs within an otherwise unfortunate event; similar to 'a blessing in disguise' or 'a silver lining'.
事故で車は壊れたが、無事だったのは不幸中の幸いだ。
The car was damaged in the accident, but it is a small mercy that no one was hurt.
地震で家は一部損壊したが、家族全員が無事だったのは不幸中の幸いだ。
Although the house was partially damaged in the earthquake, it's a relief that the whole family is safe.
仕事は失ったが、新しい道に進むきっかけになったのは不幸中の幸いだと思う。
I lost my job, but I think it was a blessing in disguise because it gave me a chance to take a new path.