Skip to content Skip to sidebar Skip to footer

Parsing Json File Python

whole file is here:https://1drv.ms/u/s!AizscpxS0QM4hJpFPnbeAexYPwYu9Q I want from this part: 'subtasks': [ { 'fields': {

Solution 1:

Ah, subtasks is the key, but the item is a list!

So it will be issue['fields']['subtasks'][0]['summary'] what you are looking for.

Solution 2:

thanks to @nawarkhede

forissuein data['issues']:
  forsubtaskin issue['fields']['subtasks']:
    if subtask['fields']['summary'] == 'The specified directory could not be found in the specified region.-traider':
      print subtask['fields']['summary']

Post a Comment for "Parsing Json File Python"