2 Samuel 22:26

24 I was also upright before him, and have kept myself from mine iniquity.

25 Therefore the LORD hath recompensed me according to my righteousness; according to my cleanness in his eye sight.

With the merciful thou wilt shew thyself merciful, and with the upright man thou wilt shew thyself upright.

27 With the pure thou wilt shew thyself pure; and with the froward thou wilt shew thyself unsavoury.

28 And the afflicted people thou wilt save: but thine eyes are upon the haughty, that thou mayest bring them down.

Do read the surrounding verses too, because the context often says more than a single verse.

Compare

BSB
To the faithful You show Yourself faithful, to the blameless You show Yourself blameless;
KJV
With the merciful thou wilt shew thyself merciful, and with the upright man thou wilt shew thyself upright.
WEB
With the merciful you will show yourself merciful. With the perfect man you will show yourself perfect.
ASV
With the merciful thou wilt show thyself merciful; With the perfect man thou wilt show thyself perfect;
DARBY
With the gracious thou dost shew thyself gracious; With the upright man thou dost shew thyself upright;
BLB
With the kind You show Yourself kind, with a blameless man You show Yourself blameless,
ÅB
Mot den fromme viser du deg from, mot den rettvise stridsmann viser du deg rettvis,
OTB
Med den trofaste viser Du Deg trofast,
Med den ulastelige viser Du Deg ulastelig;
B1930
Mot den fromme viser du dig from, mot den rettvise stridsmann viser du dig rettvis,

Study notes (Tyndale)

Original text and word study

Cross references