2 of 2 people found this helpful
TPL only expects variable usage for values. In this case obj.key.
It will not compile if you try to put a variable in as the node kind. While it will compile if you put a variable name for the attribute it will not do what you want because you end up with the string, i.e. including quotes), rather than the name and hence be the string constant rather than the value of the attribute. You could use get but that is significantly less performant.