私はこのようなWebサービスからの日付を持っています:
{
"idlife_stage_question" = 43;//..basically this should be key
"life_stage_idlife_stage" = 1;
"profile_idprofile" = 0;
"question_text" = "example";//..this should be object
sequence = 42;
}
JSONの各辞書から「idlife_stage_question」と「question_text」が必要になり、「question_text」をUIPickerViewにロードして、選択した行のテキストをUILabelに表示します。さらに、後でサーバーに「idlife_stage_question」を送信できるように、対応する「question_text」の「idlife_stage_question」を取得する必要があります。NSDictionary でこれを行うにはどうすればよいですか?
編集:
私の要件は次のとおりです。
- JSONから「idlife_stage_question」と「question_text」を取得します。
- NSMutableDictionary に「idlife_stage_question」と「question_text」を設定
- UIPicker に「question_text」を入力します
- 選択した行のテキストをラベルに表示
- 「question_text」に対応する NSMutableDictionary から「idlife_stage_question」を取得し、サーバーに送信します。