When selecting values you need to refer to the qElemNumber value rather than the text itself. The JSON error you're getting is probably because you're passing a text array to the selectValues function. In your code you need to map the qElemValue from the dimension and use that.
I've forked the solution on git and applied the code, if you'd like to see it working I can commit the changes submit a pull request.
I have submitted a pull request in git with the changes I've made. I may getting a reference to the extension ("Qv" variable) in a different way to you but hopefully it demonstrates how to execute the selection.