Avatar

Level 1

I'm attempting to craft a property accessor for referencing a set of mapped fields in our targetData, within our template, however ACC is not honoring our usage of the bracket notation, regardless of whether or not we surround the property/field name with double quotes.

Is this a known bug with a workaround or a patch?


<%
var td = {
    passholderName_1: 'passholderName_1',
    passholderName_2: 'passholderName_2'
}
%>

<%
var conditional = "passholderName";
for (var a = 1; a < 12; a++) {
    var value = td[conditional + "_" + a];
    if (value) {
%>
<%= value %>
<% } %>
<% } %>