Question 16: Find unique items from the below input.
Input:
[{"name":"test2", "role":"admin","id":2},
{"name":"test1", "role":"guest","id":1},
{"name":"test3", "role":"admin","id":3},
{"name":"test1", "role":"guest","id":1},
{"name":"test2", "role":"admin","id":2}]
Output:
[{"name":"test1", "role":"guest","id":1},
{"name":"test2", "role":"admin","id":2},
{"name":"test3", "role":"admin","id":3}]
Input:
[{"name":"test2", "role":"admin","id":2},
{"name":"test1", "role":"guest","id":1},
{"name":"test3", "role":"admin","id":3},
{"name":"test1", "role":"guest","id":1},
{"name":"test2", "role":"admin","id":2}]
Output:
[{"name":"test1", "role":"guest","id":1},
{"name":"test2", "role":"admin","id":2},
{"name":"test3", "role":"admin","id":3}]