Hi together,
I have here a small JQ ([login to view URL]) project. The usage of JQ 1.5 is mandatory for these project work! It is a jq statement / script request that extract informations from source jsons (two source examples are attached) and transform it into a new json structure in a new json file. From three different arrays (that are linked about differend index fields) in the json object has to be data extracted and composed in a new json file.
Fields & values to extract from array: suppliers objects
1. BaseRedirectUrl
2. AirlineIATACode
[login to view URL]
4. OfferIndexes <-- Matching Value to array offers
Offerindexes value from array suppliers match to object number in the array offers (example: offerindexes has value 3, this value linked these object to the third object in the array offers)
Fields & values to extract from array: offers objects
5. Currency
6. TotalPrice
7. FlightIndex <-- Matching Value to array flights
FlightIndex value from array offers match to object number in the array flights (example: offerindexes has value 2, this value linked these object to the second object in the array flights)
Fields & values to extract from array: flights objects
8. Key
9. Maxstops
For each of these linked "objects" (9 keys values from the three different arrays/objects) it is requested to build a new object in the new json file:
1. BaseRedirectUrl
2. AirlineIATACode
[login to view URL]
4. OfferIndexes
5. Currency
6. TotalPrice
7. FlightIndex
8. Key
9. Maxstops