I converted below json data (in example) to List<Map<String, String>> and from that i want to construct a new Map using Java 8 streams and the output should look like below. could someone help me with this?
Key value
Service1: DEACTIVATED
Service2: ACTIVATED
Service3: DEACTIVATED
Ex:
[
{
name=Service1,
desiredState=DEACTIVATED
},
{
name=Service2,
desiredState=ACTIVATED
},
{
name=Service3,
desiredState=DEACTIVATED
}
]