Higher petrol prices were offset by slower price rises for meat, dairy and vegetables, according to the ONS.