Using ng-repeat to loop through an array that is formatted like a string
|Added at||2017-01-02 23:01|
I have recently started adding Angular to an old app I made. Part of the app stores a json encoded array in a single cell in a mySql table. I know this is frowned upon, but I'm 100% sure it won't come back to bite me later. In the past I've just been able to do a json_decode on the array and output the values in an ordered list. Since I've included Angular, the data is being encoded and echoed at the end of the php file. It is then picked up by the Angular code and I'm able to loop through this deeply nested multidimensional object until it gets to this part...
The closest I can get is to output the string including all the backslashes, brackets and quotes which makes sense because it is a string.
I've tried doing a json_decode on every instance of sub_items, but it's not working. I think that's because the whole thing just gets encoded again.
How might I be able to loop through this array?
I have made some progress with the following based on comments in the answer from @Yaser Adel Mehraban.
The formatting of the array I was having trouble with is correct now I think, but it's sitting outside the item. I have tried to array_merge as well, but it adds a new key which would force an unnecessary ng-repeat to step down I think. Suggestions...