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 notationjavascript 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 notationdynamic properties instead javascript
var foo = { pName1 : 1, pName2 : [1, {foo : bar }, 3] , ...}
var name = "pName"
var num  = 1;
foo[name + num]; // 1
// -- 
var a = 2;
var b = 1;
var c = "foo";
foo[name + a][b][c]; // barCopyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us
