How to print object notation from variable (javascript) : I have a question about using variables with object notations. Lets say i have the following code:

    let anObject = {
    	name: 'Joaquin',
    	age: 27,
    	occupation: 'software developer',
    	interests: ['walking', 'Arduino', 'working']
    }
    let print = 'interests[0]';
    console.log(anObject.interests[0]); //prints the result
    console.log(anObject.print); //prints undefined

If i log `anObject.interests[0]` it prints the expected result. But when i store `interests[0]` in a variable and print it again it doesn't. 

How can we overcome this problem and why is it not printing the expected result?