I've seen a lot of people saying Jack was looking for Sanji but that doesn't make any sense. What makes more sense is Jack knows Law played a hand in defeating Doffy and he likely knew Law's crew was on Zou(Law said it a lot around Dressrosa) I think it makes more sense he was looking for Law on Zou to avenge Doffy more so than Sanji.