Consider something like this.
const myFunc = (x) => x.Property1;
let obj = {
Property1: "value1",
Property2: "value2"
};
console.log(myFunc(obj)); // output: value1
I need something like this:
console.log(whatINeed(myFunc, obj)) // output: **Property1**
Is it possible to achieve this requirements ?!
what will be the body of "whatINeed" function ?