# \#jsondatafile

**URL:** https://community.postman.com/tag/jsondatafile/167.md

[Latest](https://community.postman.com/latest.md) · [Categories](https://community.postman.com/categories.md) · [Tags](https://community.postman.com/tags.md)

---

## [Automate Postman script](https://community.postman.com/t/automate-postman-script/78488)

<div class="topic-metadata">

**Author:** [@arnab-das1-d908282e](https://community.postman.com/u/arnab-das1-d908282e)\
**Replies:** 1\
**Last updated:** [April 14, 2025, 11:12am UTC](https://community.postman.com/t/automate-postman-script/78488 "2025-04-14T11:12:44Z")

</div>

Hello, We are trying to generate the access token using postman Auth Type = OAuth 2.0 and to use the token for SAS application. For Grant Type I am using Grant Type = Authorization Code. Then I click on Get Access New T…

---

## [Unable to parse data from a variable](https://community.postman.com/t/unable-to-parse-data-from-a-variable/59028)

<div class="topic-metadata">

**Author:** [@rupanivenky](https://community.postman.com/u/rupanivenky)\
**Replies:** 9\
**Last updated:** [March 25, 2024, 11:41am UTC](https://community.postman.com/t/unable-to-parse-data-from-a-variable/59028 "2024-03-25T11:41:00Z")

</div>

Hi, I am getting the error when I try to read data from external json file: JSONError: Unexpected token u in JSON at position 0 I’m using this in the script to reference the data: let testData = JSON.parse(pm.collec…

---

## [How to use single json file with multiple diff payloads](https://community.postman.com/t/how-to-use-single-json-file-with-multiple-diff-payloads/51100)

<div class="topic-metadata">

**Author:** [@18fms](https://community.postman.com/u/18fms)\
**Replies:** 1\
**Last updated:** [August 29, 2023, 11:49am UTC](https://community.postman.com/t/how-to-use-single-json-file-with-multiple-diff-payloads/51100 "2023-08-29T11:49:42Z")

</div>

I have a JSON file containing two payloads for different endpoints: one for POST and the other for PUT requests. When I run the JSON file through the collection runner, I encounter an issue. If I set the iteration to 2,…

---

## [While using Runner, read/upload content from JSON file and populate a nested Map](https://community.postman.com/t/while-using-runner-read-upload-content-from-json-file-and-populate-a-nested-map/50254)

<div class="topic-metadata">

**Author:** [@supply-specialist-71](https://community.postman.com/u/supply-specialist-71)\
**Replies:** 0\
**Last updated:** [August 3, 2023, 7:19pm UTC](https://community.postman.com/t/while-using-runner-read-upload-content-from-json-file-and-populate-a-nested-map/50254 "2023-08-03T19:19:53Z")

</div>

While using Runner to send multiple POST request, I am uploading a json file. In request all tags are populated correctly, except 1 tag, key. This key tag is of type Map(String,String). This key changes for every reque…

---

## [Using 1 json file with multiple arrays as input for different requests](https://community.postman.com/t/using-1-json-file-with-multiple-arrays-as-input-for-different-requests/48375)

<div class="topic-metadata">

**Author:** [@clauspaludanatp](https://community.postman.com/u/clauspaludanatp)\
**Replies:** 2\
**Last updated:** [June 12, 2023, 9:54am UTC](https://community.postman.com/t/using-1-json-file-with-multiple-arrays-as-input-for-different-requests/48375 "2023-06-12T09:54:09Z")

</div>

I have a collection with multiple post requests (create account, create address etc.) and a json file as input that looks like this: Json data file { "testdata": { "accountlist": \[ { …

---

## [JSON File - Multiple request for an iteration](https://community.postman.com/t/json-file-multiple-request-for-an-iteration/41792)

<div class="topic-metadata">

**Author:** [@stanza](https://community.postman.com/u/stanza)\
**Replies:** 0\
**Last updated:** [December 6, 2022, 11:59am UTC](https://community.postman.com/t/json-file-multiple-request-for-an-iteration/41792 "2022-12-06T11:59:15Z")

</div>

Hi, I have the following data file in JSON: \[ { “sequence”: “CheckCompany”, “company”: \[“Google”, “Microsoft”\] }, { “sequence”: “CheckFunction”, “function”: \[ “Func1”, “Func2” \] } \] Currently, there are 2 it…

---

## [Pass data files to collection monitors](https://community.postman.com/t/pass-data-files-to-collection-monitors/37933)

<div class="topic-metadata">

**Author:** [@sseenivasan89](https://community.postman.com/u/sseenivasan89)\
**Replies:** 0\
**Last updated:** [August 5, 2022, 4:52pm UTC](https://community.postman.com/t/pass-data-files-to-collection-monitors/37933 "2022-08-05T16:52:52Z")

</div>

Pass data files (CSV, json) for collection monitors, like how do we pass for collection runner

---

## [Issues converting a string containing xml to json](https://community.postman.com/t/issues-converting-a-string-containing-xml-to-json/23118)

<div class="topic-metadata">

**Author:** [@magnus\_r](https://community.postman.com/u/magnus_r)\
**Replies:** 7\
**Last updated:** [June 10, 2022, 1:56pm UTC](https://community.postman.com/t/issues-converting-a-string-containing-xml-to-json/23118 "2022-06-10T13:56:35Z")

</div>

Hello, From a json datafile I iterate over I am trying to captire a key whose value is a string containing xml. This string needs to be converted to json (not a full json file though, just a small piece of json. That pi…

---

## [How can I use a json test data file to be remotely and broadly used in running collection](https://community.postman.com/t/how-can-i-use-a-json-test-data-file-to-be-remotely-and-broadly-used-in-running-collection/35547)

<div class="topic-metadata">

**Author:** [@shathaaah](https://community.postman.com/u/shathaaah)\
**Replies:** 0\
**Last updated:** [May 22, 2022, 9:24am UTC](https://community.postman.com/t/how-can-i-use-a-json-test-data-file-to-be-remotely-and-broadly-used-in-running-collection/35547 "2022-05-22T09:24:50Z")

</div>

How can I use a json test data file to be remotely and broadly used in running collection; so the team does not need to download the file each time they want to run the collection

---

## [Monitor with Test Data](https://community.postman.com/t/monitor-with-test-data/35463)

<div class="topic-metadata">

**Author:** [@shathaaah](https://community.postman.com/u/shathaaah)\
**Replies:** 1\
**Last updated:** [May 19, 2022, 8:33pm UTC](https://community.postman.com/t/monitor-with-test-data/35463 "2022-05-19T20:33:10Z")

</div>

Hi Everyone, So I am in the middle of automating the APIs, and I was stuck on finding a way that I can attach the test data file to be used always when monitoring the APIs How can I embed the test data file to be runni…

---

## [Single test data file for all needs?](https://community.postman.com/t/single-test-data-file-for-all-needs/27309)

<div class="topic-metadata">

**Author:** [@jprealinib2b](https://community.postman.com/u/jprealinib2b)\
**Replies:** 1\
**Last updated:** [August 31, 2021, 9:55pm UTC](https://community.postman.com/t/single-test-data-file-for-all-needs/27309 "2021-08-31T21:55:46Z")

</div>

Archived topic — this may be out of date. Newman has been replaced by the Postman CLI, Postman’s official, signed command-line tool. It runs collections as Newman did, and also lints API specs, runs mocks and monitors,…

---

## [Data driven testing using objects in graphQL queries/mutations](https://community.postman.com/t/data-driven-testing-using-objects-in-graphql-queries-mutations/24614)

<div class="topic-metadata">

**Author:** [@technical-meteorolog](https://community.postman.com/u/technical-meteorolog)\
**Replies:** 0\
**Last updated:** [June 7, 2021, 8:06pm UTC](https://community.postman.com/t/data-driven-testing-using-objects-in-graphql-queries-mutations/24614 "2021-06-07T20:06:49Z")

</div>

How can I use data driven testing in graphQL using variables and objects?: Hey all, I’m trying to implement data driven testing in my project. We’re using graphql and some of the queries/mutations has very large and tr…

---

## [Looping through a data file in the Postman Collection Runner 🍜](https://community.postman.com/t/looping-through-a-data-file-in-the-postman-collection-runner/1413)

<div class="topic-metadata">

**Author:** [@jetison](https://community.postman.com/u/jetison)\
**Replies:** 1\
**Last updated:** [April 14, 2021, 6:47pm UTC](https://community.postman.com/t/looping-through-a-data-file-in-the-postman-collection-runner/1413 "2021-04-14T18:47:16Z")

</div>

Do you like data files? Do you like ramen? If you answered yes to both of these questions, learn how to loop through a data file in the Postman collection runner. :ramen: http://blog.getpostman.com/2018/04/11/looping-t…

---

## [Getting issue for Json data file](https://community.postman.com/t/getting-issue-for-json-data-file/21610)

<div class="topic-metadata">

**Author:** [@MadhuriPandey20](https://community.postman.com/u/MadhuriPandey20)\
**Replies:** 1\
**Last updated:** [March 19, 2021, 7:55pm UTC](https://community.postman.com/t/getting-issue-for-json-data-file/21610 "2021-03-19T19:55:11Z")

</div>

My collection was working fine before. But after postman upgrade it has started throwing error for the same files which were working fine before- error I am getting is- There was an error in evaluating the test script:…

---

## [Unsupported Media Type](https://community.postman.com/t/unsupported-media-type/20809)

<div class="topic-metadata">

**Author:** [@cryosat-technologist](https://community.postman.com/u/cryosat-technologist)\
**Replies:** 8\
**Last updated:** [March 3, 2021, 2:37pm UTC](https://community.postman.com/t/unsupported-media-type/20809 "2021-03-03T14:37:48Z")

</div>

I am having issues with running a collection data file. \[{ “ordername”:“BZ2345”, “orderno”:123456, “thedate”:“2021-02-26” } \] my data file contains this exact code, and is called orders.json when i try to run a c…

---

## [Read test data file into a variable in postman](https://community.postman.com/t/read-test-data-file-into-a-variable-in-postman/14901)

<div class="topic-metadata">

**Author:** [@Balakrishna.Mandala](https://community.postman.com/u/Balakrishna.Mandala)\
**Replies:** 3\
**Last updated:** [August 11, 2020, 12:19pm UTC](https://community.postman.com/t/read-test-data-file-into-a-variable-in-postman/14901 "2020-08-11T12:19:54Z")

</div>

I have a test data file in json format. How can we read it into a variable. I am trying to compare my test data against the response.

---

## [Data Driven : How to attach single json file to Postman collection runner having multiple APIs (requests) in it?](https://community.postman.com/t/data-driven-how-to-attach-single-json-file-to-postman-collection-runner-having-multiple-apis-requests-in-it/12219)

<div class="topic-metadata">

**Author:** [@Prachii](https://community.postman.com/u/Prachii)\
**Replies:** 4\
**Last updated:** [May 5, 2020, 6:08am UTC](https://community.postman.com/t/data-driven-how-to-attach-single-json-file-to-postman-collection-runner-having-multiple-apis-requests-in-it/12219 "2020-05-05T06:08:40Z")

</div>

I am trying to automate the testing of different APIs. I have created collection in postman. There are multiple APIs present inside a collection and each API has different body structure (inputs) and different test cases…

---

## [Create and save JSON data files from the Visualizer](https://community.postman.com/t/create-and-save-json-data-files-from-the-visualizer/11357)

<div class="topic-metadata">

**Author:** [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Replies:** 0\
**Last updated:** [March 15, 2020, 8:08am UTC](https://community.postman.com/t/create-and-save-json-data-files-from-the-visualizer/11357 "2020-03-15T08:08:25Z")

</div>

The Visualizer is awesome and you can use it to create so many wonderful things, primarily, displaying your response data in a much more human consumable way would be the common use case but you can also use in to create…

---

## [Generate Runner data file from API results](https://community.postman.com/t/generate-runner-data-file-from-api-results/9851)

<div class="topic-metadata">

**Author:** [@Gregoire\_Thibaud](https://community.postman.com/u/Gregoire_Thibaud)\
**Replies:** 2\
**Last updated:** [January 5, 2020, 5:54pm UTC](https://community.postman.com/t/generate-runner-data-file-from-api-results/9851 "2020-01-05T17:54:29Z")

</div>

Hello Postman Community, I’m developing with my team a lot of APIs (through an API Manager) that I would like to test with Postman. All of these APIs must meet common requirements and must therefore be subject to the sa…

---

## [Looking for example/tutorial for initializing a database from a JSON file](https://community.postman.com/t/looking-for-example-tutorial-for-initializing-a-database-from-a-json-file/6358)

<div class="topic-metadata">

**Author:** [@app-o-matix](https://community.postman.com/u/app-o-matix)\
**Replies:** 2\
**Last updated:** [July 11, 2019, 9:37pm UTC](https://community.postman.com/t/looking-for-example-tutorial-for-initializing-a-database-from-a-json-file/6358 "2019-07-11T21:37:12Z")

</div>

I’ve built a local node server for interacting with a cloud database and I’m using Postman for the UI. I’m trying to find an example or tutorial that shows how I can loop through a JSON file to initialize the database. T…

---

## [Add files to Environments (JSON schemas, CSV files etc.)](https://community.postman.com/t/add-files-to-environments-json-schemas-csv-files-etc/4341)

<div class="topic-metadata">

**Author:** [@postman-paul540](https://community.postman.com/u/postman-paul540)\
**Replies:** 4\
**Last updated:** [March 22, 2019, 7:18pm UTC](https://community.postman.com/t/add-files-to-environments-json-schemas-csv-files-etc/4341 "2019-03-22T19:18:42Z")

</div>

I’ve started implementing JSON schema validation in my tests and it’s a bit of pain, and of course, a maintenance nightmare. I’ve currently got my schema defined in the “Pre-request Script” on a request and save it as a…

---

## [Fetching arrays of object via JSON data file in Collection Runner](https://community.postman.com/t/fetching-arrays-of-object-via-json-data-file-in-collection-runner/1373)

<div class="topic-metadata">

**Author:** [@fcardinali.uk](https://community.postman.com/u/fcardinali.uk)\
**Replies:** 0\
**Last updated:** [April 5, 2018, 1:31am UTC](https://community.postman.com/t/fetching-arrays-of-object-via-json-data-file-in-collection-runner/1373 "2018-04-05T01:31:34Z")

</div>

Hi Team and Beautiful Community Problem: I want to fetch from data file (JSON) in the collection Runner an array of object; Scenario: I have my collection in the main app here the body with all the fields that are p…
