I want to create a nested JSON-Object with the following structure:
[{
"date" : "2011",
"imgs" : [
{"path" : "img1.jpg"},
{"path" : "img2.jpg"},
{"path" : "img3.jpg"}
]
},{
"date" : "2012",
"imgs" : [
{"path" : "img4.jpg"},
{"path" : "img5.jpg"},
{"path" : "img6.jpg"}
]
}]
and so on...
I have a JSON Object with the path to an image and the timestamp. All paths from pictures of 2011 should be saved in the nested 2011 object. All pictures from 2012 in 2012.
But I don't know how I can create the imgs structure...