Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to get json data in blackberry cascades

  1. contacts.json

    {"GetCategoryResult": [ {"CategoryID":"3","CategoryName":"News","CountryID":"1","Result":"OK"}, {"CategoryID":"4","CategoryName":"Daily Paper","CountryID":"1","Result":"OK"}, {"CategoryID":"5","CategoryName":"Thanthi","CountryID":"1","Result":"OK"}, {"CategoryID":"1","CategoryName":"Newspaper","CountryID":"1","Result":"OK"}, {"CategoryID":"2","CategoryName":"Magazine","CountryID":"1","Result":"OK"} ] }

  2. main.qml

    title: ListItemData.GetCategoryResult.CategoryName

please tell how to implement this line in qml --------> title: ListItemData.????

like image 351
Rajesh Loganathan Avatar asked Oct 03 '22 01:10

Rajesh Loganathan


1 Answers

ListItemData.GetCategoryResult[i] will give u variant at i'th position in that json

for getting title as "Daily Paper"

use ListItemData.GetCategoryResult[1].CategoryName

like image 92
Manoj K Avatar answered Oct 07 '22 19:10

Manoj K