Java android studioのJSONからString変数としてデータをロードします。 私のJSONは次のとおりです。好きなようにJSONデータをAndroid Java Stringに渡す
{
"server_response": [
{
"name": "1",
"email": "[email protected]",
"mobile": "990-100010000"
},
{
"name": "2",
"email": "Tanim Khan ",
"mobile": "[email protected] "
},
{
"name": "3",
"email": "Rezaul Hasan ",
"mobile": "[email protected] "
}
]
}
そして、私のターゲット文字列のリスト:
String email[] = {
" Mirpur-13, Kafrul , Govt.Unani Medical College & Hospital, Dhaka",
" Sher-E-Bangla Nagar , Shaheed Sohrawardi Medicel College Hospital, Dhaka",
" Shahbag Square , Birdem General Hospital, Dhaka",
" Shahbag circle , BSMMU, Dhaka",
" Shaymoli bus stand , Dhaka Child Hospital, Dhaka",
" Bokshi Bazar, 100 Ramna , Dhaka Medical College Hospital, Dhaka",
" Nayabazar , Dhaka City General Hospital, Dhaka",
" Sher-E-Bangla Nagar , National Heart Institute & Hospital, Dhaka",
" Sher-E-Bangla Nagar, National Mental Health Institute & Hospital, Dhaka",
" Shayamoli, Sher-E-Bangla Nagar , National Ophthalmological Institute & Hospital, Dhaka",
" Mahakhali , National Cancer Research Institute & Hospital, Dhaka",
" Sher-E-Bangla Nagar , National Kidney Institute & Hospital, Dhaka",
" Sher-E-Bangla Nagar , National Orthopedics Hospital, Dhaka",
" Mirpur , Kidney Foundation Bangladesh, Dhaka",
" Mahakhali Kacha Bazar , ICDDRB, Dhaka"};
String mobile[] = {
"02-8012048",
"02-9130800",
"02-8616641",
"02-9661051",
"02-8116061",
"02-8626812",
"02-7390860",
"02-9122560",
"02-9118171",
"02-9118336",
"02-9880078",
"02-91365560",
"02-9144190",
"02-8055827",
"02-8806523",};
は、今私は、すべての「電子メール」の製品[]配列にJSONのデータとを設定したい名前に「モバイル」 []配列。私はそれらの配列にデータを渡す方法を教えてください。
ヘルプを求める前に、問題を解決するためにしたことを投稿してください。 – nhouser9