Online sales at the US retail giant Walmart soared 40% in the last three months helping boost overall sales to $128bn (£101bn).

Walmart shares jumped 10% ahead of the opening of the New York stock market.

President and chief executive Doug McMillion said: "We're leveraging stores and e-commerce to make shopping faster and more convenient."

Walmart's UK subsidary Asda, which is merging with Sainsbury's, reported a 0.4% rise in like-for-like sales.

That's slower than the 3.4% increase recorded in the first three months of the year which were boosted by Easter sales.

Asda boss Roger Burnley said: "Our second quarter performance shows continued momentum for 2018 and this is the first quarter we have outperformed the market since 2014.

"We remain focused on... innovation in our own brand, lowering prices and in continuously improving our shopping experience both in store and online."

Amazon threat
Before today's results Walmart's shares were among the worst performers on the Dow Jones Index, down 13% so far this year, as investors worried that its customers were increasingly turning to online retailers, such as Amazon.

Wal-Mart Stores bought online retailer Jet.com for about $3bn in 2016 to increase its online presence.

Today's numbers are the biggest jump in sales that the group has had in ten years.

Despite the performance, Walmart reported an $861m loss due to the pre-tax costs of $4.8bn on the sale of an 80% stake in its Brazilian operations as it switched its focus towards Asian markets.

Mr McMillon said: "We're continuing to aggressively roll out grocery pickup and delivery in the US and we recently announced expanded... initiatives in China and Mexico."