I am saving JSON values in the database column.
{
"24-08-2023": 1,
"25-08-2023": 1,
"26-08-2023": 0,
"27-08-2023": 0,
"28-08-2023": 1,
"29-08-2023": 1,
"30-08-2023": 1,
"31-08-2023": 1,
"01-09-2023": 2,
"02-09-2023": 0,
"03-09-2023": 0,
"04-09-2023": 2,
"05-09-2023": 2,
"06-09-2023": 2,
"07-09-2023": 2,
"08-09-2023": 2,
"09-09-2023": 0,
"10-09-2023": 0,
"11-09-2023": 3,
"12-09-2023": 4,
"13-09-2023": 4,
"14-09-2023": 4,
"15-09-2023": 6,
"16-09-2023": 0,
"17-09-2023": 0,
"18-09-2023": 5,
"19-09-2023": 6,
"20-09-2023": 6,
"21-09-2023": 6,
"22-09-2023": 9,
"23-09-2023": 0,
"24-09-2023": 0,
"25-09-2023": 8,
"26-09-2023": 8,
"27-09-2023": 9,
"28-09-2023": 9,
"29-09-2023": 9,
"30-09-2023": 0,
"01-10-2023": 0,
"02-10-2023": 9,
"03-10-2023": 10,
"04-10-2023": 10
}
But Whenever it gets saved it automatically sorts which first section(day) is ascending order
here is what gets saved
{
"01-09-2023": 2,
"01-10-2023": 0,
"02-09-2023": 0,
"02-10-2023": 9,
"03-09-2023": 0,
"03-10-2023": 10,
"04-09-2023": 2,
"04-10-2023": 10,
"05-09-2023": 2,
"06-09-2023": 2,
"07-09-2023": 3,
"08-09-2023": 3,
"09-09-2023": 0,
"10-09-2023": 0,
"11-09-2023": 3,
"12-09-2023": 4,
"13-09-2023": 4,
"14-09-2023": 4,
"15-09-2023": 4,
"16-09-2023": 0,
"17-09-2023": 0,
"18-09-2023": 5,
"19-09-2023": 7,
"20-09-2023": 7,
"21-09-2023": 5,
"22-09-2023": 9,
"23-09-2023": 0,
"24-08-2023": 1,
"24-09-2023": 0,
"25-08-2023": 1,
"25-09-2023": 9,
"26-08-2023": 0,
"26-09-2023": 9,
"27-08-2023": 0,
"27-09-2023": 8,
"28-08-2023": 1,
"28-09-2023": 10,
"29-08-2023": 1,
"29-09-2023": 9,
"30-08-2023": 1,
"30-09-2023": 0,
"31-08-2023": 1
}
If this would help I am using Mysql and json column and array as a cast for column on the model