我正在尝试构建一个示例应用程序,它将显示来自json文件的数据。为此,我想使用Tiles来显示json文件中的每个项目。那是我的json文件包含以下数据:
{
"items":[
{
"id": "item1",
"des": "All kind of books!",
"content": "These deals are too big to be public, save 50% or more on your hotel booking!",
"pname": "BOOKS",
"to": "ui5consumption@sap.com",
"price": "Flat 50% off!",
"unread": true,
"important": true
},
{
"id": "item2",
"des": "Branded!",
"content": "Deal of the day. Recommended deals: unbelievable discount!",
"pname": "WALLETS",
"to": "ui5consumption@sap.com",
"price": "Upto 50% off!",
"unread": true,
"important": false
},
{
"id": "item3",
"des": "By most famous authors!",
"content": "Dear ui5consumption, below you can find the postings which match the agents configured by you.",
"pname": "NOVELS",
"to": "ui5consumption@sap.com",
"price": "Flat 50% off!",
"unread": true,
"important": true
},
{
"id": "item1",
"des": "+DVDs+Dual DVDs",
"content": "These deals are too big to be public, save 50% or more on your hotel booking!",
"pname": "CDS",
"to": "ui5consumption@sap.com",
"price": "Between Rs.10-500/-",
"unread": true,
"important": true
},
{
"id": "item1",
"des": "Pen/Notebooks/ETC.",
"content": "These deals are too big to be public, save 50% or more on your hotel booking!",
"pname": "STATIONARY",
"to": "ui5consumption@sap.com",
"price": "Between Rs.05-5000/-",
"unread": true,
"important": true
},
{
"id": "item1",
"des": "All brands!",
"content": "These deals are too big to be public, save 50% or more on your hotel booking!",
"pname": "TVs",
"to": "ui5consumption@sap.com",
"price": "Upto 50% off!",
"unread": true,
"important": true
},
{
"id": "item1",
"des": "Fast food available here!",
"content": "These deals are too big to be public, save 50% or more on your hotel booking!",
"pname": "EATABLES",
"to": "ui5consumption@sap.com",
"price": "Between Rs.10-500/-",
"unread": true,
"important": true
}
]
}
现在我希望每个项目中的数据(即,id,des,pname等)显示在单独的图块中。我如何实现这一目标?请帮忙。我是SapUI5的新手。