title: Convert values of a dictionary to lowercase
body: <p>I have a dictionary in python that has a dictionary within it and some values are placed in an array or list. </p>
  
  <p>I want to print the dictionary to be all lowercase without changing anything else but the only code I have only iterates through values of a plain dict, it doesn't deal with arrays or lists. Any suggestions for how to fix this? Here's the code I have so far: </p>
  
  <pre><code>new_data = {}
  for i in range (0, len(json_file)):
      try: 
          data = json_file[i]['payload']
          for key, value in data.iteritems():
              new_data[value.lower()] = value
              print (new_data)
      except:
          continue
  </code></pre>
  
  <p>And this is the nested dictionary:</p>
  
  <pre><code>{
    "payload": {
      "existence_full": 1,
      "geo_virtual": "[\"56.9459720|-2.1971226|20|within_50m|4\"]",
      "latitude": "56.945972",
      "locality": "Stonehaven",
      "_records_touched": "{\"crawl\":8,\"lssi\":0,\"polygon_centroid\":0,\"geocoder\":0,\"user_submission\":0,\"tdc\":0,\"gov\":0}",
      "address": "The Lodge, Dunottar",
      "email": "dunnottarcastle@btconnect.com",
      "existence_ml": 0.56942382176587,
      "domain_aggregate": "",
      "name": "Dunnottar Castle",
      "search_tags": [
        "Dunnottar Castle Aberdeenshire",
        "Dunotter Castle"
      ],
      "admin_region": "Scotland",
      "existence": 1,
      "category_labels": [
        [
          "Landmarks",
          "Buildings and Structures"
        ]
      ],
      "post_town": "Stonehaven",
      "region": "Kincardineshire",
      "review_count": "719",
      "geocode_level": "within_50m",
      "tel": "01569 762173",
      "placerank": 65,
      "longitude": "-2.197123",
      "placerank_ml": 37.279160734645,
      "fax": "01330 860325",
      "category_ids_text_search": "",
      "website": "http:\/\/www.dunnottarcastle.co.uk",
      "status": "1",
      "geocode_confidence": "20",
      "postcode": "AB39 2TL",
      "category_ids": [
        108
      ],
      "country": "gb",
      "_geocode_quality": "4"
    },
    "uuid": "3867aaf3-12ab-434f-b12b-5d627b3359c3"
  }
  </code></pre>