Heavy-flavour jets with electrons in pp at 5.02 TeV