0
let property = $(this).val();
let property_name = this.dataset.property;


headObject[selected].property_name = property;
});

property_name is a variable not key. Are there anyway to handle this? Thank you in advance!

1 Answers1

0

I can see you are uing jQuery.

headObject[selected].attr( property_name, property ); //Where headObject[selected] is a jQuery object
Mohamed Farouk
  • 1,089
  • 5
  • 10