Referencing the value of an Entity

I am having a devil of a time figuring out how to reference some variable values from within a JS script. Its the actual construct of the JS line. I can see that the values exist from the debug log.

here’s a snippet:
NOTE: this is the name of an entity node for which I need the value. Its in the log but I simply cannot figure out to reference it from the script.

NOTE: This is a list extracted via an entity. It is from the array “HxDependents”

var selectedMember = null;
if(context.entities.CheckFordependentName) {
koreDebugger.log("GetSelectedDependent " + context.entities.CheckFordependentName);

for (i = 0; i < context.session.UserSession.hxDependents.length; i++)
{
    if (context.session.UserSession.hxDependents[i].depEligibilityId == context.entities.CheckFordependentName)
    {
        selectedMember = context.session.UserSession.hxDependents[i];
        break;
    }
}
 koreDebugger.log("DEPENDENT NAME" + context.session.UserSession.hxDependents[i].name);

}

if (!selectedMember)
{
selectedMember = context.session.UserSession.hxDependents[0];
}

context.coverageRequestParam = “eligibilityId=” + selectedMember.eligibilityId + “&dependentEligId=” + selectedMember.depEligibilityId;
koreDebugger.log("coverageRequestParam: " + context.coverageRequestParam);
UserSession.put(“selectedMember”, selectedMember);

Hi @mreynolds,

As per the discussion on the ticket, the issue has been caused due to the hard-coded values within the dialog that has furnished the entity node with the required value and stopped the bot from prompting for the input.

Regards,
Yoga Ramya