Skip to content

Access nested variable in pre-request script #7833

Closed Answered by ihexxa
mr-nothing asked this question in Help
Discussion options

You must be logged in to vote

Hey,
Hm I don't see a way to access nested value directly in Postman. In Insomnia, it intentionally provides a similar way for accessing values, additionally it is able to return an object instead of string, e.g:

const parent = insomnia.variables.get('parent'); // parent is an object
console.log(parent.property);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mr-nothing
Comment options

Answer selected by mr-nothing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants