My JSON array is as follows and I would like to build a new string that would output accordingly.
I have a simple function just to see if I can return a value but it's failing with Error was expected string or buffer
def blah(myjson):
data = json.loads(myjson)
for item in data:
result = item['svn_tag']
return result
JSON:
[{'svn_tag': '20150623r3', 'module': 'api'}, {'svn_tag': '20150624r1', 'module': 'ui'}]
Proposed Output:
api - 20150623r3, ui - 20150623r3