內部數組過濾字典我有字典例如數組:斯威夫特
[{
"CATEGORYNAME" = "name0";
"CATEGORYSUBID" = 2;
"ID" = 1;
}, {
"CATEGORYNAME" = "name1";
"CATEGORYSUBID" = 2;
"ID" = 2;
}, {
"CATEGORYNAME" = "name2";
"CATEGORYSUBID" = 0;
"ID" = 3;
}]
我用來過濾它的目標C像這樣
JSON_data = [[[Global SharedData]Categorys] filteredArrayUsingPredicate:
[NSPredicate predicateWithFormat:@"(CATEGORYSUBID == %@)", Filter]];
我試圖用濾鏡陣列,但不成功
var JSON_data = Global.SharedData().Categorys
JSON_data = JSON_data.filter(?????
JSON_data是有我有Printin
012打印所有數據
我認爲這是在迅速無filteredArrayUsingPredicate和你的代碼的結果是:「AnyObject []」沒有一個名爲成員'filteredArrayUsingPredicate' – BoSoud
是全球的,共享的數據和Categorys在迅速,或客觀-C? –
他們在目標-C我已經導入他們和數組填充 – BoSoud