Get displayvalue from variable set by name?

SB88
Tera Contributor

I would like to get a specific value from a variable set. I can do this by indexing to the specific value in the array but I would like to pull it by its name. Any thoughts on the correct syntax for this?

var vs = set.getFlatQuestions();

template.print("Print 0: " + vs. Get(0).getDisplayValue() + "<br>");
template.print("Print 0 Name: " + vs.get(0).getName() + "<br>");
template.print("Print by Name: " + vs.get('<name from above>') + "<br>");​

 

Have tried multiple ways to get the Print by Name line to work that either end with a blank line or "unspecified" as a result.

0 REPLIES 0