08/28/2017 16:22 EDT | Updated 08/29/2017 09:31 EDT

Dwayne 'The Rock' Johnson Invites Kid Who Saved Brother To Visit Vancouver's 'Skyscraper' Set

The boy learned CPR from one of the actor's movies.

The 10-year-old boy who saved his two-year-old brother from drowning after watching Dwayne "The Rock" Johnson perform CPR in the movie "San Andreas" will be meeting the actor in Vancouver.

Jacob O'Conner pulled his little brother Dylan out of their grandmother's swimming pool in Detroit last month and resuscitated him using tips he learned from a scene in the movie where Johnson revives his on-screen daughter, Global News reported.

Corbis via Getty Images
Dwayne "The Rock" Johnson and Samuel L. Jackson film a shoot-out scene for their new film 'The Other Guys,' April, 2014. (Photo by Philip Ramey/Corbis via Getty Images)

He told a local ABC News station that Dylan had wandered outside into the backyard and fallen into the pool. He added that he immediately began compressions based on what he saw in the movie.

Johnson took notice of the boy's brave and heroic actions and posted about him on social media, writing that he had to shake Jacob's hand and would be flying the entire O'Conner family to his movie set in Canada.

Johnson recounted the story in an earlier post on his Instagram.

"He pulled his little brother out and started CPR & chest compressions. He saved little Dylan's life. Jacob said he learned how to do this by watching me in his favorite movie, SAN ANDREAS," he wrote, adding that he was impressed by how calm Jacob remained.

"Jacob, I'm so proud of you — so much so, I've got to meet you," Johnson said in an accompanying video on Instagram. He added that Jacob and his family would have access to loads of candy on set.

Jacob's mother Christa tweeted that the family was thrilled to be meeting the actor and that it meant a lot to them that he was making time in his busy schedule for them.

Johnson is in Vancouver filming "Skyscraper," which also stars Canadian Neve Campbell, according to CBC News.

The actor is fond of the city, and even posted a video earlier in August sharing that it was one of his favourite cities in the world.

He's also been having fun with fans while staying in Canada. He posted another video where he teased fans who were waiting for him by jokingly driving away from them before stopping to sign autographs late at night.