How can I display data in the following layout:
the datas that published
today:
data1,
data2,
the datas that published
yesterday:
data1,
data2
If I receive the data in JSON format, what should the JSON structure look like to achieve this format?
The HTML structure is:
<div class="list dark">
<div class="item item-divider">
today
</div>
<a class="item item-avatar-left" href="#">
<img src="image">
<h2>Tyrant</h2>
<p>desc</p>
</a>
<a class="item item-avatar-left" href="#">
<img src="image">
<h2>Tyrant</h2>
<p>desc</p>
</a>
<div class="item item-divider">
yesterday
</div>
<a class="item item-avatar-left" href="#">
<img src="image">
<h2>data</h2>
<p>desc</p>
</a>
</div>