1

I am new to karate and need your help for the below requirement in karate DSL.

Below is the response (Json array object) I get when I execute a GET request:

{
    "data": [
    {
      "id": "11ab",
      "name": "Form1"
    },
    {
      "id": "12bc",
      "name": "Form2"
    }, 
  ]
}

Now I need to retrieve value of "id" when I pass value for the key "name" e.g. "Form2".

I tried traversing the Json array object "data" by mapping the "name" key value to get the "id", but unable to get the expected value.

Kindly guide me to achieve this.

Thank you. Regards, Ishwar

0 Answers0