Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9087371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:41:03+00:00 2026-06-16T21:41:03+00:00

I have the following data in a variable. My goal is to construct a

  • 0

I have the following data in a variable. My goal is to construct a dictionary with number as index and its values being url, owner email and commitMessage message. I need some ideas on how can this be done or if there is a better implementation of this. I really appreciate your input.

{
"project": "platform/vendor/company-proprietary/radio",
"branch": "master",
"id": "I2d46a51ea94d66eefe044e633b15c6eaa7dbb2af",
"number": "147441",
"subject": "radio: Update radio driver version",
"owner": {
    "name": "Shailender bary",
    "email": "bary@ca.company.com",
    "username": "bary"
},
"url": "https://company/147441",
"commitMessage": "radio: Update radio driver version\n\nUpdate radio driver version for the FC release\n\nChange-Id: I2d46a51ea94d66eefe044e633b15c6eaa7dbb2af\n",
"createdOn": 1344628179,
"lastUpdated": 1357170699,
"sortKey": "00222ad700023ff1",
"open": true,
"status": "NEW",
"currentPatchSet": {
    "number": "2",
    "revision": "18bb2f7af0dc7cad7b3959c23d886a1a48c8f728",
    "parents": [
        "96968973a0dfa1ce105cdec7c91d3304af0d8393"
    ],
    "ref": "refs/changes/41/147441/2",
    "uploader": {
        "name": "Shailender bary",
        "email": "bary@ca.company.com",
        "username": "bary"
    },
    "createdOn": 1344628312,
    "approvals": [
        {
            "type": "VRIF",
            "description": "Verified",
            "value": "-1",
            "grantedOn": 1344654401,
            "by": {
                "name": "Linux Build Service Account",
                "email": "lnxbuild@localhost",
                "username": "lnxbuild"
            }
        },
        {
            "type": "CRVW",
            "description": "Code Review",
            "value": "-2",
            "grantedOn": 1357170699,
            "by": {
                "name": "tom Johnson",
                "email": "jjohnson@ca.company.com",
                "username": "jjohnson"
            }
        },
        {
            "type": "CRVW",
            "description": "Code Review",
            "value": "1",
            "grantedOn": 1344628453,
            "by": {
                "name": "Shailender bary",
                "email": "bary@ca.company.com",
                "username": "bary"
            }
        },
        {
            "type": "TEST",
            "description": "Developer Verified",
            "value": "1",
            "grantedOn": 1344628453,
            "by": {
                "name": "Shailender bary",
                "email": "bary@ca.company.com",
                "username": "bary"
            }
        },
        {
            "type": "CRVW",
            "description": "Code Review",
            "value": "2",
            "grantedOn": 1344629368,
            "by": {
                "name": "johnb Bhatia",
                "email": "johnbb@ca.company.com",
                "username": "johnbb"
            }
        }
    ],
    "files": [
        {
            "file": "/COMMIT_MSG",
            "type": "ADDED"
        },
        {
            "file": "rime/CORE/MAC/inc/qradio_version.h",
            "type": "MODIFIED"
        }
    ]
}

{
"project": "platform/vendor/company-proprietary/radio",
"branch": "master",
"id": "I2c9c0515974a3f69b4341cf5e1e2c1b17ea10641",
"number": "143446",
"subject": "radio: Changes done for P2P Device interface.",
"owner": {
    "name": "Mohit Chang",
    "email": "mChang@ca.company.com",
    "username": "mChang"
},
"url": "https://company/143446",
"commitMessage": "radio: Changes done for P2P Device interface.\n\nChange-Id: I2c9c0515974a3f69b4341cf5e1e2c1b17ea10641\n",
"createdOn": 1343352861,
"lastUpdated": 1357170602,
"sortKey": "00222ad600023056",
"open": true,
"status": "NEW",
"currentPatchSet": {
    "number": "1",
    "revision": "743006ffcc16a725c7499aaffa1594681488e1f8",
    "parents": [
        "9bef0f406dfbd7bbd747d20a41b68fc1c2fd7c48"
    ],
    "ref": "refs/changes/46/143446/1",
    "uploader": {
        "name": "Mohit Chang",
        "email": "mChang@ca.company.com",
        "username": "mChang"
    },
    "createdOn": 1343352861,
    "approvals": [
        {
            "type": "VRIF",
            "description": "Verified",
            "value": "1",
            "grantedOn": 1343360579,
            "by": {
                "name": "Linux Build Service Account",
                "email": "lnxbuild@localhost",
                "username": "lnxbuild"
            }
        },
        {
            "type": "CRVW",
            "description": "Code Review",
            "value": "-2",
            "grantedOn": 1357170602,
            "by": {
                "name": "tom Johnson",
                "email": "jjohnson@ca.company.com",
                "username": "jjohnson"
            }
        },
        {
            "type": "CRVW",
            "description": "Code Review",
            "value": "1",
            "grantedOn": 1343353135,
            "by": {
                "name": "Shailender bary",
                "email": "bary@ca.company.com",
                "username": "bary"
            }
        },
        {
            "type": "TEST",
            "description": "Developer Verified",
            "value": "1",
            "grantedOn": 1343353135,
            "by": {
                "name": "Shailender bary",
                "email": "bary@ca.company.com",
                "username": "bary"
            }
        },
        {
            "type": "CRVW",
            "description": "Code Review",
            "value": "2",
            "grantedOn": 1343355565,
            "by": {
                "name": "johnb Bhatia",
                "email": "johnbb@ca.company.com",
                "username": "johnbb"
            }
        }
    ],
    "files": [
        {
            "file": "/COMMIT_MSG",
            "type": "ADDED"
        },
        {
            "file": "rime1_2/CORE/HDD/inc/radio_hdd_main.h",
            "type": "MODIFIED"
        },
        {
            "file": "rime1_2/CORE/HDD/src/radio_hdd_cfg80211.c",
            "type": "MODIFIED"
        },
        {
            "file": "rime1_2/CORE/HDD/src/radio_hdd_hostapd.c",
            "type": "MODIFIED"
        },
        {
            "file": "rime1_2/CORE/HDD/src/radio_hdd_main.c",
            "type": "MODIFIED"
        }{
            "file": "rime1_2/CORE/HDD/src/radio_hdd_p2p.c",
            "type": "MODIFIED"
        }
    ]
}

}

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T21:41:04+00:00Added an answer on June 16, 2026 at 9:41 pm

    okay, maybe just write a custom function to extract the data out of it? maybe something like the following.

    instance = {"project":"platform/vendor/company-proprietary/radio","branch":"master","id":"I2d46a51ea94d66eefe044e633b15c6eaa7dbb2af","number":"147441","subject":"radio: Update radio driver version","owner":{"name":"Shailender bary","email":"bary@ca.company.com","username":"bary"},"url":"https://company/147441","commitMessage":"radio: Update radio driver version\n\nUpdate radio driver version for the FC release\n\nChange-Id: I2d46a51ea94d66eefe044e633b15c6eaa7dbb2af\n","createdOn":1344628179,"lastUpdated":1357170699,"sortKey":"00222ad700023ff1","open":true,"status":"NEW","currentPatchSet":{"number":"2","revision":"18bb2f7af0dc7cad7b3959c23d886a1a48c8f728","parents":["96968973a0dfa1ce105cdec7c91d3304af0d8393"],"ref":"refs/changes/41/147441/2","uploader":{"name":"Shailender bary","email":"bary@ca.company.com","username":"bary"},"createdOn":1344628312,"approvals":[{"type":"VRIF","description":"Verified","value":"-1","grantedOn":1344654401,"by":{"name":"Linux Build Service Account","email":"lnxbuild@localhost","username":"lnxbuild"}},{"type":"CRVW","description":"Code Review","value":"-2","grantedOn":1357170699,"by":{"name":"tom Johnson","email":"jjohnson@ca.company.com","username":"jjohnson"}},{"type":"CRVW","description":"Code Review","value":"1","grantedOn":1344628453,"by":{"name":"Shailender bary","email":"bary@ca.company.com","username":"bary"}},{"type":"TEST","description":"Developer Verified","value":"1","grantedOn":1344628453,"by":{"name":"Shailender bary","email":"bary@ca.company.com","username":"bary"}},{"type":"CRVW","description":"Code Review","value":"2","grantedOn":1344629368,"by":{"name":"johnb Bhatia","email":"johnbb@ca.company.com","username":"johnbb"}}],"files":[{"file":"/COMMIT_MSG","type":"ADDED"},{"file":"rime/CORE/MAC/inc/qradio_version.h","type":"MODIFIED"}]}}
    
    
    #Say data is the dictionary you want to save the data to.
    data = {}
    
    def sanitize_data(variable):
        """ A simple function to sanitize data"""
        instance_data = {}
    
        level_one = ("url", "commitMessage")
        level_two = ("name", "email")
    
        for x in level_one:
            instance_data[x] = variable[x]
    
        for x in level_two:
            instance_data[x] = variable["owner"][x]
    
        index = len(data)
        data[index] = instance_data
        print data
    
    
    >>>sanitize_data(instance)
    {0: {'url': 'https://company/147441', 'commitMessage': 'radio: Update radio driver version\n\nUpdate radio driver', 'name': 'Shailenderbary', 'email': 'bary@ca.company.com'}}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following data. I want to take veh variable, starting with its
I have the following data frame (simplified) with the country variable as a factor
I have the following json data in a Javascript variable result : [ Object
I have the following data frame: id variable value ID1 1A 91.98473282 ID1 2A
I have the following code: $.ajax({ type: POST, url: url, data: sendable, dataType: json,
I have the following data in a SQL table Temp table variable @RndQuesnCount contains
I have a data variable which contains the following: [Object { score=2.8, word=Blue}, Object
I have the following JSON returned in a variable called data. THIS IS THE
Hello All, I have the following molten data: X variable value 1 StationA SAR11.cluster
I have the following code which takes the data in a variable $main and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.