jeudi 14 janvier 2021

How to extract and parse id from below mentioned response

Refer screenshot : enter image description here

{
    "urn:pearson:work:876fa82c-9ad7-49c3-80c9-02d3b4c84312": {
        "id": "urn:pearson:work:876fa82c-9ad7-49c3-80c9-02d3b4c84312",
        "type": "element-authoredtext",
        "schema": "http://schemas.pearson.com/wip-authoring/element/1",
        "elementdata": {

This is not working:

var jsonData = pm.response.json();
pm.environment.set("id", jsonData.id);

Aucun commentaire:

Enregistrer un commentaire