I am getting an object that looks like this
discount = {salesman: 0, supervisor: 0.02, manager: 0.05};
group_name = 'salesman';
I need to get the value of discount.group_name so if the group_name = 'salesman' I should get 0, if the group_name = manager I should get 0.05 and so on.
I tried to get it by doing
console.log(discount.group_name)
but it didn't work.
Please help me.