I have a request JSON list like this:
[
{
Id: 0,
values: [a, b, c, d]
},
{
Id: 1,
values: [1, 2, 3, 4]
},
.
.
.
]
How do I convert this to a list like this:
[
{
Name: a,
Count: 1
},
{
Name: b,
Count: 2
}
{
Name: c,
Count: 3
}
{
Name: d,
Count: 4
}
]
I have a dto class consisting of name and count attributes.