How to extract an excerpt from a JSON response?

Hello guys, I’m new to JavaScript and Postman and trying to automate some api calls.
I’m trying to figure out how to extract a string from a JSON response and set it to a variable to use it in another request.

Let’s say I have this JSON response after an API call:

I need to extract id (7e7e7gfjs7sudgdgd) and set it to a variable.
The help is much appreciated!

Hi @docking-module-spec2,

Yes you are right, you need to store them as variables.

To parse the response you should use:

let response = pm.response.json();

And based on your response you need to store the value.

I have written a blog here for beginners to parse the JSON response, this might help you :slight_smile: