flatten array result