0
の状態と等しい次の配列をフィルタリングする必要があります。 "U"と私は以下を使用しています。述語を使用したフィルタ配列
NSArray *result = [alertModified.senders filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"(subscriptions.status = %@)",@"U"]];
しかし、私は空の配列を取得しています。
これをフィルタリングするのを手伝ってください。
アレイ文字列:あなたの例で
(senderCode = CPFB, senderName = CPFB, forSenderLevel = 0, subscriptions = (
"correspondenceListId = 102,status = S,senderCode = AA,subject = Letter,retentionPeriod = 0, uniqueBillIdentifier = (null),senderResponseStatus = (null),subscriptionDate = ,effectiveDate = ",
"correspondenceListId = 103,status = U,senderCode = BB,subject = Nomination Letters,retentionPeriod = 0, uniqueBillIdentifier = (null),senderResponseStatus = (null),subscriptionDate = ,effectiveDate = ",
"correspondenceListId = 104,status = U,senderCode = AA,subject = Yearly statements,retentionPeriod = 0, uniqueBillIdentifier = (null),senderResponseStatus = (null),subscriptionDate = ,effectiveDate = ",
"correspondenceListId = 105,status = U,senderCode = BB,subject = All Future Letters,retentionPeriod = 0, uniqueBillIdentifier = (null),senderResponseStatus = (null),subscriptionDate = ,effectiveDate = "))
したがって、**サブスクリプション**、または文字列全体を何らかの形で並べ替える必要がありますか? –
コンマで区切られた文字列ですか? – wbyoung
私はソートする必要はありませんが、ステータスが「U」であるレコードをフィルタリングする必要があります。つまり、上から3レコードしか取得できません。上記の文字列は、オブジェクト階層の表現です。 – lasi