Extracting the values by ignoring the NULL value and passing randomly to next request

Hi Team,

please help in below scenario.

i need to extract the ids from response in an array where 1 id having null
value i need to ignore that "null" value and save other ids and pass to
next request randomly.

sample response like below:-
[
    {
        "id": null,

    },
    {

        "id": 1,

    },
    {

        "id": 2,

    },
    {

        "id": 3,

    },
    {

        "id": 4,

    },
    {

        "id": 5,

    }
]

am trying below line to extract

jsonPath("$[*].id").ofType[Int].findAll.saveAs("allId")

still am getting null value in response to how to ignore *null* and
pass other values randomly to next request please help me .

Regards,

kuldeep

Use transform to filter out null values and pick a random entry.
https://gatling.io/docs/current/http/http_check/#transforming

Hi Stephane ,

Thanks for responding but am new to scala gatling can you please share any examples so i can understand easily and implement to my code .

Regards,
kuldeep