我还没有在Stack Overflow上找到答案。
这是API Foursquare发送的JSON摘录:
toggle
{ popular: {
isOpen: false,
isLocalHoliday: false,
timeframes: [{
days: "Aujourd'hui",
includesToday: true,
open: [{
renderedTime: "18:00–02:00"
}],
segments: []
},
{
days: "sam.",
open: [{
renderedTime: "18:00–02:00"
}],
segments: []
},
{
days: "dim.",
open: [{
renderedTime: "18:00–21:00"
}],
segments: []
},
{
days: "lun.",
open: [{
renderedTime: "19:00–Minuit"
}],
segments: []
},
{
days: "mar.",
open: [{
renderedTime: "18:00–Minuit"
}],
segments: []
},
{
days: "mer.",
open: [{
renderedTime: "18:00–23:00"
}],
segments: []
},
{
days: "jeu.",
open: [{
renderedTime: "18:00–Minuit"
}],
segments: []
}
]
},
数组中对象的顺序在Foursquare API的响应之间不一致(数组可能在星期一,或星期二等开始,取决于我相信的当天)。
我希望获得星期一的timeframes
值(.open[0].renderedTime
为days
)。
如何查找"lun."
等于星期一的timeframes
条目?
我希望有类似的东西:
days
非常感谢!