I have this output JSON. It comes from this type
List<List<TextValue>>
TextValue class is String text, String value.
"data": [
[
{
"text": "DescCode",
"value": "01"
},
{
"text": "DescName",
"value": "Description 1"
},
{
"text": "SecondCode",
"value": "01"
}
],
[
{
"text": "DescCode",
"value": "02"
},
{
"text": "DescName",
"value": "Description 2"
},
{
"text": "SecondCode",
"value": "02"
}
]
]
I would like to transform it to this JSON out.
which I believe would be this object setup.
List<Map<String, String>>
"data": [
{
"DescCode": "01",
"DescName": "Description 1",
"SecondCode": "01"
},
{
"DescCode":"02",
"DescName":"Description 2",
"SecondCode":"02"
}
]
My JSON is created automatically by my Spring REST controller so I really just need the Java object, Json is just for Reference.
Am I off base with this? List<Map<String, String>>