# There was an error in evaluating the Pre-request Script: TypeError: Cannot read property 'shift' of undefined

**URL:** <https://community.postman.com/t/there-was-an-error-in-evaluating-the-pre-request-script-typeerror-cannot-read-property-shift-of-undefined/18094>\
**Category:** Help Hub\
**Tags:** tests, variables, collections\
**Created:** [November 29, 2020, 9:21pm UTC](https://community.postman.com/t/there-was-an-error-in-evaluating-the-pre-request-script-typeerror-cannot-read-property-shift-of-undefined/18094 "2020-11-29T21:21:44Z")\
**Posts on this page:** 1\
**Showing post:** 21

<div class="post-metadata">

**Author:** ![harutharut](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/harutharut/32/6996_2.png) [@harutharut](https://community.postman.com/u/harutharut)\
**Post date:** [September 12, 2022, 1:08pm UTC](https://community.postman.com/t/there-was-an-error-in-evaluating-the-pre-request-script-typeerror-cannot-read-property-shift-of-undefined/18094/21 "2022-09-12T13:08:20Z")

</div>

I have opened new topic in help category related to this question.  
Please, let me know if you need more information.  
Thanks in advance

> [@Run the collection using array of objects properties as variables](https://community.postman.com/t/run-the-collection-using-array-of-objects-properties-as-variables/39048):
>
> Hello community, I need some help. Below is attached my code, the problem is accessing to array’s objects properties and using them as variables. I have generated an array of objects. It is big array and I should run the collection with a different dataset in each run until the size of the array. First of all You can run the pre-request script to get the array of objects, it’s something like this: let requestsArray = [{"r\_type":"01", "r\_target":"1", "u\_range":"1"},{"r\_type":"02", "r\_target":…

---

_[View the full topic](https://community.postman.com/t/there-was-an-error-in-evaluating-the-pre-request-script-typeerror-cannot-read-property-shift-of-undefined/18094)._
