# Random numbers from array into postman test

**URL:** <https://community.postman.com/t/random-numbers-from-array-into-postman-test/7452>\
**Category:** Help Hub\
**Tags:** tests\
**Created:** [August 27, 2019, 10:48am UTC](https://community.postman.com/t/random-numbers-from-array-into-postman-test/7452 "2019-08-27T10:48:21Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![singhsivcan](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/singhsivcan/32/1595_2.png) [@singhsivcan](https://community.postman.com/u/singhsivcan)\
**Post date:** [August 27, 2019, 11:35am UTC](https://community.postman.com/t/random-numbers-from-array-into-postman-test/7452/2 "2019-08-27T11:35:42Z")

</div>

Hello @Natasha.HildrewBrown, welcome to the community! 👋

Pardon me if I misunderstood you.  
So, according to what I got is you have an array of random numbers and while sending the POST request, that array needs to be sent as the part of the `request body`.

Well,  
Here’s [an answer that’s 90% close](https://community.postman.com/t/sharing-tips-and-tricks-with-others-in-the-postman-community/5123/6) to what you’re trying to achieve.

The answer above is related to using the variable from datafile in collection runner, however you can ignore that and jump ahead.

So instead of this line:

```javascript
let productLine = pm.iterationData.get('productLine');

```

you’ll be writing something like:

```javascript
let productLine = pickOne; // Or whichever array you want to send

```

You’ll need to just assign your array.

You can tweak around more, by exploring the [amazing concept of variables in Postman](https://learning.getpostman.com/docs/postman/environments_and_globals/variables/).

Let me know if you’re still stuck with this!

---

_[View the full topic](https://community.postman.com/t/random-numbers-from-array-into-postman-test/7452)._
