我如何解析以下JSON对象以检索Python中的相关字段

时间:2017-03-31 10:00:35

标签: javascript python json parsing tags

如何解析以下JSON对象以检索“name”,“contains-group”等相关字段...我正在使用python,我需要提取给定字段的值。

The JSON object is provided below.

{
-"com.response-message": {
-"com.header": {
"com.firstIndex": 0,
"com.lastIndex": 2
},
-"com.data": {
-"nd.group": [
-{
"nd.containing-group": "MD=CISCO_EPNM!GR=All Locations",
"nd.description": "This is a location group",
"nd.fdn": "MD=CISCO_EPNM!GR=System Campus",
"nd.name": "System Campus"
},
-{
"nd.containing-group": "MD=CISCO_EPNM!GR=All Locations",
"nd.description": "This is a location group",
"nd.fdn": "MD=CISCO_EPNM!GR=Unassigned",
"MD=CISCO_EPNM!ND=J_59.J_cisco.com",
"MD=CISCO_EPNM!ND=42_Head"
]
},
-{
-"nd.contained-group": [
"MD=CISCO_EPNM!GR=Optical Networking",
"MD=CISCO_EPNM!GR=Third Party Device"
],
"nd.description": "Device Type",``
"nd.fdn": "MD=CISCO_EPNM!GR=Device Type",
"nd.name": "Device Type"
}
]
}
}
}

0 个答案:

没有答案