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 nameusers[*].friends[*].name;// random index users list; and random index of that user friends list and nameusers[@f].name;// first index of users list and nameusers[@m].name;// middle index of users list and nameusers[@l].name;// last index of users list and nameusers[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
