# Getting Random value from json string

**URL:** <https://community.gatling.io/t/getting-random-value-from-json-string/3074>\
**Category:** Gatling (Open-Source)\
**Created:** [June 15, 2016, 10:30am UTC](https://community.gatling.io/t/getting-random-value-from-json-string/3074 "2016-06-15T10:30:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manohari](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@Manohari](https://community.gatling.io/u/Manohari)\
**Post date:** [June 15, 2016, 10:30am UTC](https://community.gatling.io/t/getting-random-value-from-json-string/3074/1 "2016-06-15T10:30:34Z")

</div>

Hi Stephen,

```auto
def Read_HDAS_Profile_Data = exec(http("WS_Get_Profilelist")
    .get("http://localhost:8088/Xirgo_Profiles.list?key=${Client_ID}")
    .check(jsonPath("$.data").ofType[String].exists.saveAs("ProfileTIDList")))

```

```auto

```

Out put of the above gatling code

{“key”:“38035”,“data”:[“5562122fe4b083d4c6c8f0cc”,“55621241e4b083d4c6c8f0d2”,“5562122ce4b083d4c6c8f0cb”,“55621260e4b083d4c6c8f0dd”,“55621222e4b083d4c6c8f0c7”,“55621148e4b083d4c6c8f079”,“55621213e4b083d4c6c8f0c1”,“5562127ae4b083d4c6c8f0e4”,“5562127de4b083d4c6c8f0e5”,“55621225e4b083d4c6c8f0c8”,“5562115fe4b083d4c6c8f080”]}

From the above json randomly i have to select one value

Can anyone help on this

Thanks

```auto

```
