Process multiple elements in JSON body

With gatling 2.0.0-M3a, I receive response from a simulated HTTP request in JSON below:

[{
“href”: “/api/id1”,
“key”: “type1”,
“value”: “value1”
}, {
“href”: “/api/id2”,
“key”: “type2”,
“value”: “value2”
}, {
“href”: “/api/id3”,
“key”: “type3”,
“value”: “value3”
}]

What I need to do next is to search for both key and value that match predefined search criteria, and use the corresponding href in subsequent HTTP request.

In steps, I’d like to how I should store hrefs, keys, and values if needed? How do I perform the search on both key and value in loop? How can I find the href corresponding to its key and value pair if found?

Thank you much for all suggestions.

Have you tried JsonPath: https://github.com/excilys/gatling/wiki/Checks#json

Note that implementation in 2M3a is based on Jayway’s library, which is quite buggy, and we developed our own in upcoming version:
https://github.com/excilys/gatling/wiki/Continuous-Integration

https://github.com/excilys/gatling/blob/master/src/sphinx/http/http_check.rst#http-response-body