重複の可能性:
JSONkit の並べ替えの問題
私は次のjsonを持っています
[
{
"Pending": 67,
"Past Due": 63,
"Invites": 0
},
{
"Reading Approval": 4,
"Schedule Approval": 16,
"Session Assignment": 1
},
{
"Reading Approval": 3,
"Schedule Approval": 20,
"Class Approval": 20,
"Module Approval": 2,
"Training Plan Review": 2,
"Job Confirmation": 1
}
]
json 文字列を nsarray に割り当てると、辞書内の値がアルファベット順に並べ替えられます。
NSArray *arr = [strResult JSONValue];
json 文字列と同じ順序を維持するにはどうすればよいですか?
arr =
{
Invites = 0;
"Past Due" = 63;
Pending = 67;
},
{
"Reading Approval" = 4;
"Schedule Approval" = 16;
"Session Assignment" = 1;
},
{
"Class Approval" = 20;
"Job Confirmation" = 1;
"Module Approval" = 2;
"Reading Approval" = 3;
"Schedule Approval" = 20;
"Training Plan Review" = 2;
}
)
これは私が表示したいテーブルです:
Group 1
Pending 67
Past Due 63
Invites 0
Group 2
Reading Approval 4
Schedule Approval 16
Session Assignment 1
Group 3
Reading Approval 3
Schedule Approval 20
Class Approval 20
Module Approval 2
Training Plan Review 2
Job Confirmation 1