To All the Boys I've Loved Before is a novel written by Jenny Han. In this novel, a young girl named Lara Jean Covey writes love letters that get sent out without her knowledge. The boys these letters are meant for receive these letters, and Lara Jean must deal with the consequences.
Josh is one of the boys who received a love letter. Josh also happens to be the boy that Lara Jean's older sister Margot dated for a long time until she broke up with him before moving to college. Lara Jean has always had romantic feelings for Josh and has had to suppress these feelings since he was dating her sister. She still has these feelings and does not want to admit them to Josh.
Lara Jean and a boy named Peter Kavinsky pretend to date each other so that Lara Jean's true feelings about Josh are not revealed. As the story unfolds, Lara Jean realizes that she actually does not have romantic feelings for Josh and that she is in love with Peter.
At the end of the novel, Josh is left with no girlfriend, no best friend, and with the feeling of knowing his emotions have been played with by all those he thought were important to him.