That's the card. The right thing; the ticket. The reference is to tickets of admission, cards of the races, and programmes.
“10s. is about the card.” —Mayhew: London Labour, etc.
A queer card. An eccentric person, “indifferent honest.” A difficult lead in cards to play to. A knowing card. A sharp fellow, next door to a sharper. The allusion is to card-sharpers and their tricks.
“Whose great aim it was to be considered a knowing card.” —Dickens: Sketches, etc.
A great card. A big wig; the boss of the season; a person of note. A big card. A leading card. A star actor. A person leads from his strongest suit.
A loose card. A worthless fellow who lives on the loose.
“A loose card is a card of no value, and, consequently, the properest to throw away.” —Hoyle: Games, etc.
A sure card. A person one can fully depend on; a person sure to command success. A project to be certainly depended on. As a winning card in one's hand.
He is the card of our house. The man of mark, the most distingué. Osric tells Hamlet that Laertës is “the card and calendar of gentry” (v. 2). The card is a card of a compass, containing all its points. Laertës is the card of gentry, in whom may be seen all its points. We also say “a queer card,” meaning an odd fish.
That was my best trump card. My best chance. The allusion is to loo, whist, and other games played with cards.
To play one's best card. To do that which one hopes is most likely to secure success. To speak by the card. To speak by the book, be as precise as a map or book, be as precise as a map or book. A merchant's expression. The card is the document in writing containing the agreements made between a merchant and the captain of a vessel. Sometimes the owner binds himself, ship, tackle, and furniture for due performance, and the captain is bound to deliver the cargo committed to him in good condition. To speak by the card is to speak according to the indentures or written instructions. In some cases the reference is to the card of a mariner's compass.
“Law ... is the card to guide the world by.” —Hooker: Ecc. Pol., part ii. sec. 5.
“We must speak by the card, or equivocation will undo us.”— Shakespeare: Hamlet, v. 1.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894