Random number of entries in payload
See original GitHub issueHi I would be nice if it was possible to randomize the number of entries in the payload. An example could be orders with a random number of order lines.
Let’s say I have some orders:
payload:
- path: "orders.csv"
fields:
- "order_number"
- "first_name"
- "last_name"
… and some lines:
payload:
- path: "order-lines.csv"
fields:
- "product_number"
- "price"
- "quantity"
Then it would be nice to be able to randomize the number of order lines, eg. like this:
json:
order_number: "{{ order_number }}"
first_name: "{{ first_name }}"
last_name: "{{ last_name }}"
lines:
random-array:
min: 1
max: 5
product_number: "{{ product_number }}"
price: "{{ price }}"
quantity: "{{ quantity }}"
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Generating random number inside json file - Stack Overflow
I want to give a random number in json file which is payload for the API post request. The "ssn" value in json...
Read more >Random Number Node - Losant Documentation
The Random Number Node generates a random integer within a range of your choosing.
Read more >How can I generate a random value but limited between two ...
How can I generate a random value but limited between two values such as a value between ... ReservoirCapacity = parseInt(Math.random() * 25);...
Read more >Generate a random number in Dataweave
Could you guys help me in generating a random number, ... [CDATA[%dw 1.0; %output application/xml; ---; rows: {(payload.rows.
Read more >How to do a random number bruteforce in burp suite?
I want to do a bruteforce from number 38000000000 to 39000000000 but what is happening here, when I try to bruteforce with Payload...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here is what I’m doing for my workaround. There is a possibility of duplicates with this approach. I’m working with a large input CSV and my system needs to be able to handle duplicates.
My
beforeRequest
javascript does the followingThanks for sharing that @erasmussenBHTP, that’s very helpful! We’ll need to size up the effort of adding support for tags/functions that operate on the node itself.