Nov-23-2022, 02:31 AM
Thank you for your professionalism. My bad.
I ran the code below and it executes. Can you do me a favor and point out from here how can I retrieve the value of the "compliance" key?
I ran the code below and it executes. Can you do me a favor and point out from here how can I retrieve the value of the "compliance" key?
import json def new_func(): RAW_DATA = """ {"131998795651": { "cloudformation": { "CloudFormation Drift Detection Analysis": { "analysis_results": [{ "account_id": "131998795651", "analysis_scope": "Service", "analyzer_name": "CloudFormation Drift Detection Analysis", "compliance": "Pass", "evidence": "Cloudformation stack is in sync for drift detection." }]}}}}""" return RAW_DATA RAW_DATA = new_func() def scanvuln(rawdata, account): data = json.loads(rawdata) for i in data.items(): print(i) myaccount = "131998795651" scanvuln(RAW_DATA, myaccount) 