set object property name from variable code example
Example 1: javascript dynamically access object property
var person ={"first_name":"Billy","last_name":"Riley"};
var property_name="first_name";
alert(person[property_name]); //Dynamically access object property with bracket notation
Example 2: c# object set property
myObject.GetType().GetProperty(property).SetValue(myObject, "Bob", null);