How to change each value in a JSON in python
<pre><code>output = {'name': 'StackOverflow',
  'competitors': [{'competitor': 'bing',
                   'link': 'bing.com'},
                  {'competitor': 'google',
                   'link': 'google.com'}],
  'acquisition': {'acquired_day': 16,
                  'acquired_month': 12,
                  'acquired_year': 2013,
                  'acquiring_company': {'name': 'Viggle',
                                        'permalink': 'viggle'}}}
</code></pre>

<p>I have code which looks like this:</p>

<pre><code>def traverse(obj):
    if isinstance(obj, dict):
        for key, value in obj.iteritems():
            print('dict_key', key)
            traverse(value)
    elif isinstance(obj, list):
        for value in obj:
            traverse(value)
    else:
        print('value', obj)


traverse(output)
</code></pre>

<p>This code traverses the whole JSON and prints each value and key. I need to set each value to a random string </p>