New York CNN Business  — 

Walmart’s all-important holiday sales blew past expectations, a sign the retailer can more than hold its ground against Amazon.

Sales at US stores open at least a year grew 4.2% over the holiday stretch compared with last year, including a 43% rise in digital sales. Walmart said its online sales got a boost from rolling out grocery pickup to stores across the country. It also expanded delivery to reach more shoppers.

Online sales increased quickly after Walmart added pickup and delivery to some stores and acquired new digital clothing brands like Eloquii and lingerie retailer Bare Necessities. More than 10% of Walmart shoppers used curbside pickup in January, according to research from analysts at Cowen.

Walmart’s stellar holiday shows that its recent moves to improve stores and expand online have worked. Walmart has focused its investments on offering its low-and-middle income shopping base cheaper and more convenient ways to buy groceries. It has also poured money into sprucing up stores and raising wages for workers.

At the same time, it has redesigned its website and bought several high-end brands— including Bonobos and Modcloth— to draw wealthier shoppers.

Low unemployment, rising wages, and a drop in gas prices also helped Walmart during the holidays. The government shutdown had a positive impact on Walmart’s earnings because February SNAP benefits were doled out early. That led to a 0.4% rise in sales, Walmart said.

The company also stocked up on toys to lure shoppers during the first holiday season in years without Toys “R” Us. Those efforts paid off.

Moving forward, Walmart will invest in growing online instead of opening up physical stores.

The company only plans to open 10 new stores this year. It already has more than 4,700 US stores, and more than 90% of the country lives within 10 miles of a Walmart.

Walmart plans to bring curbside pickup to around 1,000 more stores this year, but predicts that online sales growth will slow to 35%.

Walmart’s strong results should calm fears about a troubling report from the Commerce Department last week, which showed core retail sales plummeted 1.7% in December, the most in nearly two decades.

Wall Street shrugged off worries about new regulations in India. Walmart bought online retailer Flipkart for $16 billion a year ago.

Walmart’s (WMT) stock jumped 3% in early trading Tuesday.