I have an object having structure
const row = { data : { name : 'hello',version : '1.2'
}};
I have function which tell what data you want
function getData (temp)
{
// temp could be name or version
return row.data."temp";
}
I want result like if I call getData("name")
it should result in "hello"
and if call getData("version")
is called it should result "1.2". In JavaScript.