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 hope that helps.