He did what was right in the eyes of Yahweh, following the example of all that David, his ancestor, had done.