Ответсообщение недоступно
No need to import CSV
From the output you're getting from splitting each line of text, you can select the indexes meant for each row and put them in their appropriate locations.
{
"2022":
{
"1": amount,
"2": amount,
},
"2021":
{
"3": amount
}
That's what it should look like.