I have a list of data that looks like that:
{
"wallet": {...},
"transactions": [
{
"createdAd": 1617121058,
"id": 1,
"value": 100
...
},
{
"createdAd": 1617121090,
"id": 1,
"value": 100
...
},
...
]
}
Now I need to group the transactions by date ( all transactions on the same day not same second ) to be something like below:
{
"wallet": {...},
"transactions": [
{
"createdAd": 1617121058,
"transactions": [
// list of all transactions that have been done at that day ( not time )
]
},
{
"createdAd": 1617121058, // another day
"transactions": [
// list of all transactions that have been done at that day ( not time )
]
},
// ...etc
]
}
I don't know if I should put some code here but I don't guess it will that useful as my code most of it SQLite queries and mapping so will kinda unrelated to what I need here.