Here is the data output structure:
Map<String, List<Pair<String, String>>>
"testdata": [
{
"1.0": "True"
},
{
"1.1": "False"
}
]
I now need to present this data on the UI in the format
"testdata":["1.0","1.1","1.2"]
,
where I specifically want to fetch only the first elements from each Pair and place them in the structure Map<String, List<String>>
Can you provide me with a javascript code snippet that accomplishes this task?
this.previousData = versions.filter(v => v !== this.version).map(item => ({ text: item, value: item }))
How can I adjust this code to achieve the desired output of
"testdata":["1.0","1.1","1.2"]
?