Unix zip directory but excluded specific subdirectories (and everything within them)

I’m trying to zip a directory (on Unix via SSH) but I need to exclude a couple of subdirectories (and all files and directories within them).

zip -r myarchive.zip dir1 -x dir1/ignoreDir1/**\* dir1/ignoreDir2/**\*

Source: Unix zip directory but excluded specific subdirectories (and everything within them) – Super User