Forum Discussion

Rish's avatar
Rish
New Contributor
7 years ago

Extract multiple JSON response properties to use in the next request

I have a GET request that has a response like:

[{
   "message_category_id": "1",
   "message_sub_category_id": "1",
   "message_id": "1",
   "heading": "Test Heading 1",
   "summary": "Test Summary 1",
   "body": "Test Body 1",
   "is_seen": true,
   "is_read": true,
   "is_archived": false
}]

The POST request that follows this, requires a JSON input like:

[
  {
    "message_id": "hex",
    "is_seen": true/false,
    "is_read": true/false,
    "is_archived": true/false
  }
]

Is there a way I can extract only the properties I need from the GET response and use it in the POST request as a JSON input?

No RepliesBe the first to reply