this is the json format
[ { baseurl: 'http://localhost:5051/springbootdemo/getServerData',
server: '1' },
{ baseurl: 'http://localhost:5052/springbootdemo/getServerData',
server: '1' },
{ baseurl: 'http://localhost:5053/springbootdemo/getServerData',
server: '2' },
{ baseurl: 'http://localhost:5054/springbootdemo/getServerData',
server: '2' } ]
i want to re arrange it in this form
[
{server:1 , urls: [
"http://localhost:5051/springbootdemo/getServerData",
"http://localhost:5052/springbootdemo/getServerData"
]},
{server:2 , urls: [
"http://localhost:5053/springbootdemo/getServerData",
"http://localhost:5054/springbootdemo/getServerData"
]}`enter code here`
]
I want the re arrangement in above format.