After making a call to the API and fetching the array, I have the following data structure:
0:
2019-07-25: {title: "Sub task for 11"}
__proto__: Object
1: {2019-07-19: {…}}
2: {2019-07-24: {…}}
3: {2019-07-26: {…}}
4: {2019-07-25: {…}}
5: {2019-07-24: {…}}
6: {2019-07-25: {…}}
7: {2019-07-25: {…}}
I am looking to convert the above object array into the desired format as shown below:
"2019-07-25": {title: "Sub task for 11"},
"2019-07-19": {title: "Sub task for 12"},
"2019-07-24": {title: "Sub task for 13"},
"2019-07-26": {title: "Sub task for 14"}
I have attempted to perform this conversion without success. If anyone has a solution or knows how to achieve this, please help me out. Thank you.