There was a reason behind Jennifer Lopez’s recent diet challenge — she’s trimming down to play a stripper.

The actress, 49, went on the diet with boyfriend Alex Rodriguez where they dramatically cut out carbs and sugar for 10 days.

JLo said the idea of the “extreme” diet came from her trainer while preparing for a movie where she’ll have a tiny wardrobe.

“I’m getting ready for this movie called Hustlers and I have to play a stripper so I’m getting ready for that,” she said on The Ellen DeGeneres Show.

“I work out a lot, I try to stay healthy but (my trainer) was like ‘let’s do something to move the needle.’”

But when presented with the idea to eliminate bread and sweets the Shades of Blue actress wasn’t sure she was up to it.

“That’s most of my diet,” she admitted. “I was like ‘Completely? Like cold turkey?’”

The couple successfully completed the challenge on January 31 but it didn’t come without its struggles.

“You feel like you’re in an alternate reality or universe, like you’re addicted and you think about it all the time,” she said of bread-themed daydreams, but admitted that by the time the 10 days were up her cravings weren’t too bad.

“When you go back to the sugar you don’t want it as much, it’s something you get used to a little bit,” she said. “It takes down the inflammation and you feel smaller and less swollen then you get addicted to that feeling too.”

The results can be seen in an Instagram post showing off her fit figure and sculpted abs on day nine.

J. Lo also told DeGeneres that Rodriguez bought her a fixer-upper home for their two-year anniversary and Fixer Upper host Joanna Gaines has offered to help out with the project.