2

1.Array Type

{"DATA":
[
{"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.Direct Type

[
{"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"}
]

for direct type declaration --->

 ListItemComponent {
     type: "listItem"
     StandardListItem {
         title: ListItemData.CategoryName
     }
 }

my question is how to declare title: ListItemData.??????? for first json array model

Somendra Meena
  • 129
  • 3
  • 12
Rajesh Loganathan
  • 11,129
  • 4
  • 78
  • 90

1 Answers1

1

try this

ListItemComponent {
 type: "listItem"
 StandardListItem {
 title: ListItemData.DATA[0].CategoryName
 }
 }
  • It didn't worked for me. I even tried changing `listItem` to `item` and few other changes, but none of them worked. It don't even shows the **ListView** – Somendra Meena Jul 13 '18 at 16:03