Home > other >  How to extract the data dictionary content
How to extract the data dictionary content

Time:10-28

{'result': {'historyNames': '中国人民财产保险有限公司南充市分公司\t', 'regStatus': '存续', 'cancelDate': None, 'regCapital': '', 'staffNumRange': '-', 'industry': '保险业', 'bondNum': None, 'type': 1, 'bondName': None, 'revokeDate': None, 'legalPersonName': '李双', 'revokeReason': None, 'regNumber': '511300000024201', 'creditCode': '91511300X213200114', 'property3': None, 'usedBondName': None, 'fromTime': 887731200000, 'approvedTime': 1533225600000, 'socialStaffNum': 0, 'alias': '人民', 'actualCapitalCurrency': '', 'companyOrgType': '股份有限公司分公司(上市,国有控股)', 'id': 1510353245, 'orgNumber': 'X21320011', 'cancelReason': None, 'toTime': None, 'actualCapital': '', 'estiblishTime': 887731200000, 'regInstitute': '南充市顺庆区市场监督管理局', 'taxNumber': '91511300X213200114', 'businessScope': '财产损失保险,责任保险,信用保险,意外伤害保险,短期健康保险,保证保险等人民币或外币保险业务; Associated with the business of reinsurance business; Various types of property insurance, accident injury insurance, short-term health insurance and reinsurance services and consulting business; Agent insurance institutions related business; National laws and regulations or other businesses approved by the state insurance regulators, (subject to ratification in accordance with the project, the related department approval to operate) ', 'regLocation' : nanchong shunqing xihe road no. 1 ', 'regCapitalCurrency' : ' 'and' tags' : None, 'name' : 'the Chinese people's property insurance co., LTD., nanchong branch', 'bondType percentileScore' : None, ' '8372,' isMicroEnt ': 0,' base ':' sc '}, a tiny ':' ok ', 'error_code' : 0}

Teachers, please ask how to put forward a certain value, for example, I want the value behind the businessScope, with what method? Please grant instruction

CodePudding user response:

 
dict1={'result': {'historyNames': '中国人民财产保险有限公司南充市分公司\t', 'regStatus': '存续', 'cancelDate': None, 'regCapital': '', 'staffNumRange': '-', 'industry': '保险业', 'bondNum': None, 'type': 1, 'bondName': None, 'revokeDate': None, 'legalPersonName': '李双', 'revokeReason': None, 'regNumber': '511300000024201', 'creditCode': '91511300X213200114', 'property3': None, 'usedBondName': None, 'fromTime': 887731200000, 'approvedTime': 1533225600000, 'socialStaffNum': 0, 'alias': '人民', 'actualCapitalCurrency': '', 'companyOrgType': '股份有限公司分公司(上市,国有控股)', 'id': 1510353245, 'orgNumber': 'X21320011', 'cancelReason': None, 'toTime': None, 'actualCapital': '', 'estiblishTime': 887731200000, 'regInstitute': '南充市顺庆区市场监督管理局', 'taxNumber': '91511300X213200114', 'businessScope': '财产损失保险,责任保险,信用保险,意外伤害保险,短期健康保险,保证保险等人民币或外币保险业务; Associated with the business of reinsurance business; Various types of property insurance, accident injury insurance, short-term health insurance and reinsurance services and consulting business; Agent insurance institutions related business; National laws and regulations or other businesses approved by the state insurance regulators, (subject to ratification in accordance with the project, the related department approval to operate) ', 'regLocation' : nanchong shunqing xihe road no. 1 ', 'regCapitalCurrency' : ' 'and' tags' : None, 'name' : 'the Chinese people's property insurance co., LTD., nanchong branch', 'bondType percentileScore' : None, ' '8372,' isMicroEnt ': 0,' base ':' sc '}, a tiny ':' ok ', 'error_code' : 0}

Print (dict1 [' result '] [' businessScope '])

CodePudding user response:

Can be the same as the one above, directly with brackets

. You can also use the get () method to extract, dict1. Get (" result "). The get () 'businessScope'

CodePudding user response:

If it is a string, first data=https://bbs.csdn.net/topics/json.loads (STR), and then according to the above do friends said
  • Related