I am new to scala ,Any help would be very much appreciated
I have a scala Map which has around 10 ids and 10 weights Map(id->id,weight->weight)
For post request in gatling , i would like to pass my request on basis of for loop Expected json: so for example , if there are 10 key values pair in my map - i would like to add 10 inner array in my final json string and there should be a single request.
myjson=
of[
{
"id":pis
"weight":20.3
}
]
Expected json=
of[
{
"id":pis
"weight":20.3
},
{
"id": 2nd value from for loop
"weight":2nd value from for loop
},
{
"id": 3rd value from for loop
"weight":3rd value from for loop
}
]