generalize appending a json name-value pair, allow click to be last instead of first
wrap json name in quotes