Spoilers ahead for Jean Hanff Korelitz's "You Should Have Known." HBO drama The Undoing, which stars Nicole Kidman and Hugh Grant, is loosely based on Jean Hanff Korelitz's 2014 book "You Should Have Known." Yet the title isn't the only distinction between the book and the series. Being a loose adaptation, there are plenty of details and plot points from the book that didn't make it into the series—you can read an in-depth guide to those here—and starting episode two, the series goes down a different road from the book. Though the series' ending hasn't yet aired, it's likely that the book ends very differently from the series, because the narrative has already gone down such a different road.
That said, if you're wondering how You Should Have Known ends, let me break down the book and its ending for you. (No spoilers for the TV show here.)
Yes, Jonathan did kill Elena—and he's eventually captured.
One of the biggest differences from the series: Jonathan only shows up in the novel in past tense. He's already gone when the book starts, and he's on the run until the very last pages. He is also, without a shadow of a doubt, guilty. In the novel, he even confesses to the murder in a letter to Grace that seeks to manipulate her into abandoning her new life—he begs her to meet him at a location thousands of miles from where he actually is—seemingly confirming that Jonathan is, in fact, a sociopath.
In the book, there's no trial. There's no beach house capture. (There is a beach house, but Grace and Henry remain there for the entirety of the novel, and Jonathan never shows up.) The specter of Jonathan haunts the novel, but he isn't in even one present-day scene. At the very end of the book, Jonathan is captured by Interpol and extradited back to the United States. The narrative of the book is simpler, the ending more bittersweet: Yes, Jonathan killed Elena (known in the book as Malaga), just like he caused the death of his younger sibling all those years ago.
Grace and Henry move away from New York and start a new life.
Remember that beach house? Well, in the novel, Grace and Henry never leave the beach house. Henry starts school nearby; Grace reconnects with an old friend (her former best friend, in fact, a woman who recognized Jonathan as a sociopath); Grace and Henry rescue a dog and winterize the summer home; Grace's dad visits and they repair their relationship. All of this takes place while Jonathan is on the run.
Part of the reason that Grace and Henry adapt so well to their new life is because Henry thrives there. He loves his new school (much more than he liked Rearden), he makes friends quickly, and he seemingly bounces back from the loss of his dad. While he's at school during the daytime, Grace takes the time to grieve her marriage and the life she left behind, processing all that's occurred and adjusting to the reality of their new existence.
The friend that Grace reconnects with has an expanding mental-health practice of her own nearby, and Grace decides to shut down her New York practice and work with her old friend. There's even a happy ending of sorts: By the end of the novel, Grace is moving on, kissing a local man who has become a good friend. He's the opposite of Jonathan: less charming, less attractive, but kind and decent and, it seems, just what Grace needs.
The director spoke about using the book as a framework.
In an interview with Marie Claire after the finale aired, director Susanne Bier said: "Although the series uses the book [as inspiration] for the first two episodes, it does use the book as a kind of conceptual framework. That whole notion to 'regulate the truth,' to massage the truth into what we want it to be, is such a big important issue that we all felt we were doing a really fun and really entertaining whodunit twist and turn but at the core of it was that [book's philosophy]."