Data:
var data = [ { \"id\": 1, \"level\": \"1\", \"text\": \"Sammy\", \"type\": \"Item\", \"items\": [
Since Lo-Dash 3.0.0, _.flattenDeep(data) will return a deeply flattened array as you desire. There is also a _.flatten(data) function that flattens shallowly.