"He did what Yahweh judged to be right" or "He did what Yahweh considered to be right". See 2 Chronicles 14:2.