How to dynamically format assertion in Postman

You need to read the other thread, which should explain why you can’t target elements like this.

Concade dynamic variable with pm.response.json() to fetch response value - Ask the Experts and Postman Tips - Postman Community

You cannot target the element using a string using plain old JavaScript.

You can however, use Lodash.

1 Like