I need help creating a Typescript function that takes 2 arguments, where the second argument is always a string type. This function should apply the second argument as a property on the first argument.
For example:
let x = measure('Hello', 'length'); // should return 'Hello'.length
// => x = 5
Any suggestions on how I can convert the string 'length' into a property of 'Hello' to achieve the desired result?