Were there ever attempts to use giant magnets in ancient warfare?

Or Breaking Bad when they tried to fry a laptop in an evidence locker with a huge electromagnet.

Or the Super Friends episode about “The Shamon U.”

I’ve seen it work plenty in cartoons. Tends to backfire on coyotes, though.

In the Danny Kaye comedy The Court Jester, his suit of armor is magnetized by a lightning strike, with humorous results.

I vaguely recall a Ripley’s Believe It or Not claiming that in ancient China there was once a gateway built of lodestone that would reveal if someone passing through it were hiding iron weapons in their clothing; but I couldn’t find a cite and in any event Ripley’s was somewhere between Wikipedia and P.T. Barnum in veracity.

What about a large net that had lots of smaller magnets interwoven in it? Assuming they had some practical way of keeping it from sticking to itself, the net could be thrown at groups of knights with the idea that the little magnets would stick to all the armor and swords, making them hopelessly tangled.

You could have a rope attached to one end that had a winch you could use to drag your foes into spike pits or into the moat to drown them.

Often, the best weapons on the ancient world were made of bronze – which is non-magnetic.

Note too that modern society would suffer much more from an electromagnetic pulse than an ancient society would have.

My kind of anti-hero.