[Python] Parse out specific key and children into new file [closed]

Discussão em 'Python' iniciado por Stack, Maio 23, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to parse out a specific key named vulnerabilities out of my JSON file, and store it in a new file.

    Below is some of the work I tried in doing this, but just cannot seem to get it right.

    JSON:

    [​IMG]

    and current code:

    import json

    with open("raw.json") as data_file:
    data = json.load(data_file)

    data['results'][0]['vulnerabilities']

    Continue reading...

Compartilhe esta Página