我试图从以下 JSON 文件中获取 tvrage_name。
{
data: {
Band of Brothers: {
air_by_date: 0,
cache: {
banner: 1,
poster: 1
},
language: "en",
network: "HBO",
next_ep_airdate: "",
paused: 0,
quality: "Any",
status: "Ended",
tvdbid: 74205,
tvrage_id: 2708,
tvrage_name: "Band of Brothers"
},
Breaking Bad: {
air_by_date: 0,
cache: {
banner: 1,
poster: 1
},
language: "en",
network: "AMC",
next_ep_airdate: "2013-07-14",
paused: 0,
quality: "HD",
status: "Continuing",
tvdbid: 81189,
tvrage_id: 18164,
tvrage_name: "Breaking Bad"
},
},
message: "",
result: "success"
}
有没有办法在 valueForKeyPath 中使用通配符?所以 valueForKeyPath 将是: data.*.tvrage_name (* 将是通配符)