-2

Taking into account the result of a POST request

{
    "<Id>k__Field": "ac12432e-b1fb-4c46-9aed-9d7e246bf613"  
}

I need to get this result in a variable inside Postman:

code

But it is throwing an error.

How can I get the value in a correct way?

DanielV
  • 1,772
  • 2
  • 34
  • 54

1 Answers1

2

Looks like you should just omit Id altogether as it isn't in the JSON.

var id = jsonData.k__Field;

Also <Id> is not valid JS syntax

You should use:

var id = jsonData["<Id>k__Field"]; 
DanielV
  • 1,772
  • 2
  • 34
  • 54
Jake C
  • 126
  • 5