Issue with setting collection variable using script

Iā€™m having issue setting collection variable from the response body using script which is the 6th step of Skillcheck of Postman api fundamentals student expert

The command you have looks correct, so Iā€™m going to assume the problem is with line 1 and the targeting of the actorName.

Get used to console logging your variables.

Step one would be to console log the actorName variable.
Does it contain any data or is it showing undefined?

If its undefined, then start to troubleshoot by console logging the response, and navigate down the structure one level at a time until you hit the element you are looking for.

If you post a copy of your response, then it would be easier for anyone on the forum to spot any potential issues with targeting the element. (I suspect one of the elements in the chain is an array, but without seeing the response this is just a guess).

TIP: When posting code or response data, please use the pre-formatted text option in this editor (and paste it as text, not a screenshot). This then allows us to copy and paste into Postman Echo or a mock so we can emulate your response.