for key in second_response.keys():
new = second_response[key]
if isinstance(new, dict):
if 'Tank1FuelUpDnVol' in new['Params']:
index = new['Params'].index('Tank1FuelUpDnVol')
time = new['Params'].index('DateTimeFirst')
last_time = new['Params'].index('DateTimeLast')
value = new['Items']
if value[0]["Caption"] == 'Заправка':
for item in value:
tank_value = value[0]['Values'][index]
start_of_refueling = value[0]['Values'][time]
end_of_refueling = value[0]['Values'][last_time]
tank.append((tank_value, start_of_refueling, end_of_refueling, key))
response_2 = request_2.json()
df = pd.json_normalize(response_2)
exploded = df.explode('d051eb0d-0445-4c0d-aeb2-4f22a03a5886.Items.Values')
pprint(exploded)