implements a basic set function to add or modify key at the root of the json