A Paw Extension to find a random index path based on another request. Also includes specific aliased index lookup.
Rindex includes simple index tools to load either a specific index {int}, random index {*}, or aliased index {first @f, middle @m, last @l}. The goal is to allow a simplified way to write tests or dependent requests that utilities a wide range of data. Randomizing the data ensures that the request will work for multiple cases derived from the dependent result of the request set.
users[*].name; // random index of users list and name
users[*].friends[*].name; // random index users list; and random index of that user friends list and name
users[@f].name; // first index of users list and name
users[@m].name; // middle index of users list and name
users[@l].name; // last index of users list and name
users[2].name; // third index of users list and name (follows normal array access)
1. Make a request for dependent data for the NEW Request
2. From EXISTING Request copy a key path (we will change request later)
3. In the NEW Request type the paw dynamic variable.
4. Copy and paste the keypath from the EXISTING to the NEW Request.
5a. Change keypath according to the rules outlined above.
See LICENSE.md