I need to create a new array from another with a condition: for example from this array [{"id":1,"name":"root"},{"id":2,"p
[{"id":1,"name":"root"},{"id":2,"p