I think you would find the Wikipedia entry on Dharma would answer your question.

References to words in the RV can be easily had by fetching the text from GRETIL or elsewhere, and just searching.  But that's not enough.  Meanings arise only from sentences.  So you have to read and understand the sentences and think about the meanings.  For example, the use and meaning of the word "dharma" in the RV is very different from "dharma" in the dharmaśāstras. 

There is important scholarship from Olivelle, developed over recent years, that suggests that the development of the Brāhmaṇa dharmaśāstra literatures is a direct response to the challenge of the Buddha's use of dhamma as a key term on which to  hang his teaching.  Pre-Buddhist uses of the word are not prominent, ideologically speaking.

​Dominik Wujastyk​