If you want to iterate over both keys and values of the dictionary, do this:
for key, value in data.items():
print(key, value)
More Related Contents:
- What are the differences between json and simplejson Python modules?
- What is faster – Loading a pickled dictionary object or Loading a JSON file – to a dictionary? [closed]
- Single versus double quotes in json loads in Python
- Check if a dictionary contain data true of false, then send a response back
- Why am I seeing “TypeError: string indices must be integers”?
- Convert JSON string to dict using Python
- Is there a memory efficient and fast way to load big JSON files?
- Python: json.loads returns items prefixing with ‘u’
- How to convert an XML string to a dictionary?
- How to flatten a nested JSON recursively, with flatten_json
- Let JSON object accept bytes or let urlopen output strings
- String to Dictionary in Python [duplicate]
- Python – How to convert JSON File to Dataframe
- How to load all entries in an infinite scroll at once to parse the HTML in python
- Convert a python dict to a string and back
- Python json.loads fails with `ValueError: Invalid control character at: line 1 column 33 (char 33)`
- django-rest-framework 3.0 create or update in nested serializer
- How do I send a POST request as a JSON?
- Flask jsonify a list of objects
- Updates to JSON field don’t persist to DB
- How to dynamically build a JSON object?
- Retrieving JSON objects from a text file (using Python)
- pandas.io.json.json_normalize with very nested json
- How to convert a list of numbers to jsonarray in Python
- Write two-dimensional list to JSON file
- How do I check if a string is valid JSON in Python?
- How to change json encoding behaviour for serializable python object?
- Python json.loads changes the order of the object
- Insert multiple documents in Elasticsearch – bulk doc formatter
- How can I serialize a numpy array while preserving matrix dimensions?