Dec-16-2019, 05:27 AM
can you tell what is wring in my following code : want to access certain key values from a json file (in dictionary format) and store it to a variable.
if rain:
key_values=[[data['state'] for data in response.json['records']['data'] if 'state' in data and str(data ['rainyDate']).lower()== str(rain).lower()]
if rain:
key_values=[[data['state'] for data in response.json['records']['data'] if 'state' in data and str(data ['rainyDate']).lower()== str(rain).lower()]