traverseList function

List traverseList(
  1. dynamic data,
  2. List<String> keys
)

Implementation

List<dynamic> traverseList(dynamic data, List<String> keys) {
  return [traverse(data, keys)].expand((x) => x is List ? x : [x]).toList();
}