Supreme Court Justice Sonia Sotomayor wanted to 'be a detective like Nancy Drew' as a kid

Sotomayor recently celebrated 10 years serving on the Supreme Court.

Supreme Court Justice Sonia Sotomayor opened up about how being diagnosed with juvenile diabetes more than 57 years ago taught her a valuable life lesson that has inspired the message for her latest work.

"Don't presume the worst in people who do different things," Sotomayor said on "Good Morning America." "Just ask," she added, a nod to the title of her new children's book.

"One day I'm in a restaurant and I'm in the bathroom giving myself an injection and this woman walks in and sees me finishing up and putting my injection away and I walk out and at the end of our meal, I get up to walk past her and I overhear her say to her companion, 'she's a drug addict,'" Sotomayor recalled.

"I stopped and I was embarrassed and I turned around and I walked back to the woman and said, 'I'm not a drug addict, I'm a diabetic. And you saw me taking insulin which is a drug that saves my life.'"

Sotomayor, 65, said her new book, "Just Ask! Be Different! Be Brave! Be You!" has been in her head for over 30 years and said "a young Sonia Sotomayor is actually a character in this book."

"I've been giving myself insulin shots every day and I've learned how to do it because I wanted the freedom to live my life in the way everybody else does, but it also made me realize there are so many kids in the world who live with their own conditions," Sotomayor said. "Each one of us lives with our condition and we live well and successfully, but sometimes people look at us as if we're different."

Sotomayor has made her differences a powerful driving force, especially in her career. She was the first Hispanic person to be appointed to the federal bench in New York, the third female U.S. Supreme Court justice and the first Hispanic to hold that title.

She recently celebrated her 10-year anniversary on the court and said the hardest part of being a justice is the fine line and opinion of right versus wrong.

"There's really often no really right or wrong answer," she told a group of children on "GMA," adding that in every case there is a winner and a loser. "That's the hardest part of doing justice, which you know no matter how right you think you are under the law, and that's the way I vote when I decide a case, you know that the other side doesn't feel like you've really done them justice."

But even after all her years on the bench, Sotomayor said she had a different dream in mind as a child.

"When I was young I wanted to be a detective, like Nancy Drew," she said.