2017년 6월 30일 금요일

Parse Json string to value


I have a long json string as below. I can Parse one Json. But I don't know parse the long string
How can I add each string to a list and then using for each item in list?

[{"DEPARTMENT_BELONG":"20000","DEFECT_CODE":"2001","BIG_DEFECT":"Clean","VN_DEFECT":"Do Keo"},{"DEPARTMENT_BELONG":"20000","DEFECT_CODE":"2002","BIG_DEFECT":"Clean","VN_DEFECT":"Loi Bu"},{"DEPARTMENT_BELONG":"20000","DEFECT_CODE":"2003","BIG_DEFECT":"Clean","VN_DEFECT":"Dau Chi"},{"DEPARTMENT_BELONG":"20000","DEFECT_CODE":"2004","BIG_DEFECT":"Clean","VN_DEFECT":"In hinh"},{"DEPARTMENT_BELONG":"20000","DEFECT_CODE":"2005","BIG_DEFECT":"Clean","VN_DEFECT":"Long,short hair"},{"DEPARTMENT_BELONG":"20000","DEFECT_CODE":"2006","BIG_DEFECT":"Clean","VN_DEFECT":"Color bleeding"},{"DEPARTMENT_BELONG":"20000","DEFECT_CODE":"2007","BIG_DEFECT":"Clean","VN_DEFECT":"Khac mau"},{"DEPARTMENT_BELONG":"20000","DEFECT_CODE":"2008","BIG_DEFECT":"Straight","VN_DEFECT":"Nhan"},{"DEPARTMENT_BELONG":"20000","DEFECT_CODE":"2009","BIG_DEFECT":"Straight","VN_DEFECT":"May khong dung dinh vi va in hinh"},{"DEPARTMENT_BELONG":"20000","DEFECT_CODE":"2010","BIG_DEFECT":"Straight","VN_DEFECT":"Se so khong tron deu"},{"DEPARTMENT_BELONG":"20000","DEFECT_CODE":"2011","BIG_DEFECT":"Straight","VN_DEFECT":"Meo den"},{"DEPARTMENT_BELONG":"20000","DEFECT_CODE":"2012","BIG_DEFECT":"Straight","VN_DEFECT":"Meo mui"},{"DEPARTMENT_BELONG":"20000","DEFECT_CODE":"2013","BIG_DEFECT":"Straight","VN_DEFECT":"Meo got"},{"DEPARTMENT_BELONG":"20000","DEFECT_CODE":"2014","BIG_DEFECT":"Straight","VN_DEFECT":"Chan ben chi khong dong nhat"},{"DEPARTMENT_BELONG":"20000","DEFECT_CODE":"2015","BIG_DEFECT":"Straight","VN_DEFECT":"May lon size"},{"DEPARTMENT_BELONG":"20000","DEFECT_CODE":"2016","BIG_DEFECT":"Straight","VN_DEFECT":"Bao bien to nho"},{"DEPARTMENT_BELONG":"20000","DEFECT_CODE":"2017","BIG_DEFECT":"Straight","VN_DEFECT":"Day chu tai dai ngan"},{"DEPARTMENT_BELONG":"20000","DEFECT_CODE":"2018","BIG_DEFECT":"Straight","VN_DEFECT":"Duong may khong chong mui"},{"DEPARTMENT_BELONG":"20000","DEFECT_CODE":"2019","BIG_DEFECT":"Strong","VN_DEFECT":"Xu chi"},{"DEPARTMENT_BELONG":"20000","DEFECT_CODE":"2020","BIG_DEFECT":"Strong","VN_DEFECT":"Lo kim"},{"DEPARTMENT_BELONG":"20000","DEFECT_CODE":"2021","BIG_DEFECT":"Strong","VN_DEFECT":"Rach"},{"DEPARTMENT_BELONG":"20000","DEFECT_CODE":"2022","BIG_DEFECT":"Strong","VN_DEFECT":"Long chi, noi chi"},{"DEPARTMENT_BELONG":"20000","DEFECT_CODE":"2023","BIG_DEFECT":"Strong","VN_DEFECT":"Dut chi"}]

--
Using a combination of the Web component's JsonTextDecode block and list blocks you can access any entry data record and tag value:


JsonToList.aia

--
Nice example.   Added it to the FAQ

--
I make this block as you show me. Now, My problem is solved.


--
Nicely done!
Thanks for letting us know that it is working for you.

--

댓글 없음:

댓글 쓰기