Green’s Dictionary of Slang

john n.1

also johndarm, john darme
[abbr./mispron. of Fr. gendarme]

1. [mid-19C+] a police officer, usu. male.

2. in attrib. use of sense 1.

In compounds

john elbow (n.) [he grabs one by it]

[20C+] a police officer.

John Law (n.) (also johnnie law) [John n. (1) + SE law]

[20C+] (orig. Und. US) a policeman, esp. a senior one.

john palace (n.) (also john house) [SE palace]

[1900s] (Aus.) a police station.

In phrases

big john (n.)

[1970s+] (US black) the police.