How to get a single field inside an array of assign?
LJason77 opened this issue · 4 comments
LJason77 commented
I have json:
{
"count": 2,
"rows": [
{
"_id": "aaa",
"name": "AAA"
},
{
"_id": "bbb",
"name": "BBB"
}
]
}
and benchmark.yml:
- name: get all
request:
url: /get_all
assign: all
I want to get a single id, for example, this kind of:
- name: delete
request:
url: /del/{{ all.body.rows[0]._id }}
method: DELETE
The above code is not working, what should I do?
fcsonline commented
Nowadays, the json access for previous requests doesn't support array steps. But it could be a really nice addition
olka commented
Executing OS commands to parse json in every request would be a performance killer.
Is there a way to implement this feature or there is a design complications that prevent this?
fcsonline commented
Not super complicated, but it needs to be implemented.