List<dynamic>? newCustomFunction2(List<dynamic>? data) { if (data == null) { return []; } return data.where((element) => element['status'] == 'Pending').toList(); }