我有很多结构不同的对象。但我知道他们都有属性名称“siteName”。我的问题是如何从这个属性中获得价值。几个对象的解释:
feature1 = {
display: "name",
feature: {
attributes: {
when: '111',
what: '222'
},
geometry: null
infoTemplate: undefined
},
symbol: null
siteName: 'aa'
}
feature2 = {
feature: {
attributes: {
when: '111',
what: '222'
},
geometry: null
infoTemplate: undefined
},
static: {
format: {
weight: 12,
siteName: 'cccc'
},
}
}