I came across the following sentence on HelloTalk, and can't figure out what the second 人 after 思ってた is doing.
いい人だなって思ってた人が、実は話しかけてきた目的が変だと気づいた時、本当に残念な気持ちになる。
I can see when using a translator that it translates to "A person I thought was a good person...", but I can't break down how.
When I searched for other sentences using just the latter (e.g., ここまでだと思ってた人は意外と少ないんじゃないでしょうか which translates to "Surprisingly few people thought it would go this far"), it makes a bit more sense, but it further confuses the previous statement for me.
Can someone explain what's going on here? Is it a fixed expression? Or is there a particle omitted or a some other rule in place here that I'm unfamiliar with?