Hi,
I got stuck in verifying the attribute names which are not consistent always.
E.g. The attribute name in response is =>
“ email_families_opt_indicator ”: “true”
Now next time the attribute name might come as =>
“ email_individual_opt_indicator ”: “true”
I wanted to parametrize above attribute name so that or is picked up from a variable and then accordingly the attribute name is verified.
Below is the code with hardcoded value for attribute name =>
pm.test(“Opt Indicator - Expected true”, function () {
pm.expect(“true”).to.eql(response.traits.email_ families _opt_indicator);
});
Any help on above would be appreciated. Thanks.