Java tutorial
//package com.java2s; import java.util.ArrayList; import java.util.List; import java.util.Map; public class Main { public static List<Map<String, String>> searchFromAccNumber(List<Map<String, String>> orders, String acc) { List<Map<String, String>> result = new ArrayList<Map<String, String>>(); if (acc != null) { for (Map<String, String> o : orders) { if (acc.equalsIgnoreCase(o.get("accountNumber"))) { result.add(o); } } } return result; } }