I have the following JSON data.
[{'connectionId': 1, 'roomId': 140, 'connectionName': 'Hai'},
{'connectionId': 1, 'roomId': 147, 'connectionName': 'Hai'},
{'connectionId': 2, 'roomId': 100, 'connectionName': 'hello'},
{'connectionId': 2, 'roomId': 140, 'connectionName': 'hello'}]
I want to retrieve response like the below from the above data using typescript
[ { 'connectionId': 1, 'roomId': [ 140, 147] , 'connectionName': 'Hai'}
, { 'connectionId': 2, 'roomId': [ 100, 140] , 'connectionName': 'hello'}
]
How to solving this?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…