Hi, I have a datasubset:
{{impact: 0.0, country_nm: "AA", year: "2019"},
{impact: 0.0, country_nm: "AA", year: "2020"},
{impact: 0.0, country_nm: "AA", year: "2021"},
{impact: 0.0, country_nm: "AA", year: "2022"},
{impact: 0.0, country_nm: "AA", year: "2023"},
{impact: 0.0, country_nm: "BB", year: "2019"},
{impact: 0.0, country_nm: "BB", year: "2020"},
{impact: 0.0, country_nm: "BB", year: "2021"},
{impact: 0.0, country_nm: "BB", year: "2022"},
{impact: 0.0, country_nm: "BB", year: "2023"}
},
And what I am trying to do is to convert it to different datasabsuet:
{
{country_nm: "AA",{
{year: "2019", impact:0},
{year: "2020", impact:0},
{year: "2021", impact:0},
{year: "2022", impact:0},
{year: "2023", impact:0}
}},
{country_nm: "BB",{
}}
}
Is it possible to do?
Thanks
Discussion posts and replies are publicly visible