Python Forum
Using a value from one json file to another.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using a value from one json file to another.
#1
Hello,

We are using Pytest for our API Automation and wanted to avoid hard coding throughout the test by dynamic insertion of the values for the fields.

So to be precise - a response of API-1 contains "id" fields with it's value. The response is written to a file.
However, the same "id" field is used in the payloads of API-2.

So, we wanted to use the value of API-1 "id" field to payload of API-2 route.
How can I make that happen ? Please suggest.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with reading json file hhchenfx 5 299 Jul-07-2021, 01:58 PM
Last Post: hhchenfx
  Request for Python code - Features extraction from JSON file (cuckoo) thinker 1 440 Apr-07-2021, 04:40 PM
Last Post: Larz60+
  Sort data from JSON file Dummy_in_programming 2 543 Jan-04-2021, 06:17 PM
Last Post: deanhystad
  Json File more pages #pandas #dataframe nio74maz 0 488 Dec-30-2020, 05:32 AM
Last Post: nio74maz
  reading json file DrBrownStats 1 510 Nov-25-2020, 09:00 AM
Last Post: Larz60+
  How to convert what appears to be a JSON file to CSV NewBeie 4 768 Aug-28-2020, 04:45 PM
Last Post: Larz60+
  live updated json file Nyanpasu 2 680 Aug-22-2020, 04:41 PM
Last Post: Nyanpasu
  empty json file error mcmxl22 1 2,523 Jun-17-2020, 10:20 AM
Last Post: buran
  saving a dictionary as json file vinay_py 6 896 Jun-06-2020, 05:07 PM
Last Post: vinay_py
  How can i parse a log file to JSON. menarcarlos 2 782 May-26-2020, 10:23 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020