the joke is on someone
idiomDefinition of the joke is on someone
—used to describe a situation in which a person trying to make something happen to someone else (such as being tricked or embarrassed) ends up having it happen to himself or herself instead He thought he could embarrass us, but now the joke is on him and he's the one who looks foolish.