【发布时间】:2014-12-31 16:38:10
【问题描述】:
鉴于此 JSON
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"MODE": "A"
},
"geometry": {
"type": "Point",
"coordinates": [
-69.23583984375,
45.460130637921004
]
}
},
{
"type": "Feature",
"properties": {
"MODE": "D"
},
"geometry": {
"type": "Point",
"coordinates": [
-69.23651039600372,
45.46053888199693
]
}
}
]
}
我想使用jq 过滤并选择拥有MODE: D 属性的features。据我所知,查询jq .[] | select(.MODE == "D") 应该可以工作,但不能!
我错过了什么?
提前致谢。
【问题讨论】:
标签: javascript json filter geojson jq