Using **getEvents** (below) i am able to show List of Events.

```
{
    "events": [
        {
            "id": "1",
            "name": "Winter Festival",
            "multiOperatives": "1,3"
        },
        {
            "id": "2",
            "name": "Summer Festival",
            "multiOperatives": "2,4"
        }
    ]
}

```

JSON to parse Operatives **getOperatives**

```
{
    "operatives": [
        {
            "id": "1",
            "firstName": "Operative 1"
        },
        {
            "id": "2",
            "firstName": "Operative 2"
        },
        {
            "id": "3",
            "firstName": "Operative 3"
        },
        {
            "id": "4",
            "firstName": "Operative 4"
        }
    ]
}

```

but now i don't know ***how to show particular Operatives*** only, like i want whenever **user do tap on Summer Festival**, then i just need to show only ***two Operatives*** namely, *Operative 2 and Operative 4*....

**GetEventsActivity.java**:

```
public class GetEventsActivity extends ListActivity {

    // url to make request
    private static String url = "http://myurl.tld/webservice.php?ws=getEvents&u=p&p=y";

    // JSON Node names
    private static final String TAG_EVENTS = "events";

    private static final String TAG_ID = "id";
    private static final String TAG_NAME = "name";
    private static final String TAG_MULTI_OPERATIVES = "multiOperatives";

    // Alert dialog manager
    AlertDialogManager alert = new AlertDialogManager();

    // Connection detector
    ConnectionDetector cd;

    // events JSONArray
    JSONArray events = null;
    String multiOperatives;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_events);

         cd = new ConnectionDetector(getApplicationContext());

            // Check for internet connection
            if (!cd.isConnectingToInternet()) {
                // Internet Connection is not present
                alert.showAlertDialog(GetEventsActivity.this, "Internet Connection Error",
                        "Please connect to working Internet connection", false);
                // stop executing code by return
                return;
            }

        // Hashmap for ListView
        ArrayList<HashMap<String, String>> contactList = new ArrayList<HashMap<String, String>>();

        // Creating JSON Parser instance
        JSONParser jParser = new JSONParser();

        // getting JSON string from URL
        JSONObject json = jParser.getJSONFromUrl(url);

        try {
            // Getting Array of events
            events = json.getJSONArray(TAG_EVENTS);

            // looping through All events
            for(int i = 0; i < events.length(); i++){
                JSONObject c = events.getJSONObject(i);

                // Storing each json item in variable
                String id = c.getString(TAG_ID);
                String name = c.getString(TAG_NAME);
                multiOperatives = c.getString(TAG_MULTI_OPERATIVES);

                // creating new HashMap
                HashMap<String, String> map = new HashMap<String, String>();

                // adding each child node to HashMap key => value
                map.put(TAG_ID, id);
                map.put(TAG_NAME, name);
                map.put(TAG_MULTI_OPERATIVES, multiOperatives);

                // adding HashList to ArrayList
                contactList.add(map);
            }
        } catch (JSONException e) {
            e.printStackTrace();
        }

        /**
         * Updating parsed JSON data into ListView
         * */
        ListAdapter adapter = new SimpleAdapter(this, contactList,
                R.layout.activity_list,
                new String[] { TAG_NAME }, new int[] {
                        R.id.name });

        setListAdapter(adapter);

        // selecting single ListView item
        ListView lv = getListView();

        // Launching new screen on Selecting Single ListItem
        lv.setOnItemClickListener(new OnItemClickListener() {

            @Override
            public void onItemClick(AdapterView<?> parent, View view,
                    int position, long id) {

                Intent intent = new Intent(GetEventsActivity.this, GetOperativesActivity.class);
                intent.putExtra("multiOperatives", multiOperatives);
                startActivity(intent);                        
            }
        });
    }
}

```

**GetOperativesActivity.java:-**

```
 public class GetOperativesActivity extends ListActivity {

    // url to make request
    private static String url = "http://myurl.tld/webservice.php?ws=getOperatives&u=p&p=y";

    // JSON Node names
    private static final String TAG_OPERATIVES = "operatives";

    private static final String TAG_ID = "id";
    private static final String TAG_NAME = "firstName";

    // Alert dialog manager
    AlertDialogManager alert = new AlertDialogManager();

    // Connection detector
    ConnectionDetector cd;

    // events JSONArray
    JSONArray events = null;

    String multiOperatives;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_operatives);

         if (android.os.Build.VERSION.SDK_INT > 9) {
                StrictMode.ThreadPolicy policy = 
                new StrictMode.ThreadPolicy.Builder().permitAll().build();      
                    StrictMode.setThreadPolicy(policy);
             }

         cd = new ConnectionDetector(getApplicationContext());

            // Check for internet connection
            if (!cd.isConnectingToInternet()) {
                // Internet Connection is not present
                alert.showAlertDialog(GetOperativesActivity.this, "Internet Connection Error",
                        "Please connect to working Internet connection", false);
                // stop executing code by return
                return;
            }

            Intent intent = getIntent();
            multiOperatives = intent.getStringExtra("multiOperatives");

        // Hashmap for ListView
        ArrayList<HashMap<String, String>> contactList = new ArrayList<HashMap<String, String>>();

        // Creating JSON Parser instance
        JSONParser jParser = new JSONParser();

        // getting JSON string from URL
        JSONObject json = jParser.getJSONFromUrl(url);

        try {
            // Getting Array of events
            events = json.getJSONArray(TAG_OPERATIVES);

            // looping through All events
            for(int i = 0; i < events.length(); i++){
                JSONObject c = events.getJSONObject(i);

                // Storing each json item in variable
                String id = c.getString(TAG_ID);
                String name = c.getString(TAG_NAME);

                // creating new HashMap
                HashMap<String, String> map = new HashMap<String, String>();

                // adding each child node to HashMap key => value
                map.put(TAG_ID, id);
                map.put(TAG_NAME, name);

                // adding HashList to ArrayList
                contactList.add(map);
            }
        } catch (JSONException e) {
            e.printStackTrace();
        }

        /**
         * Updating parsed JSON data into ListView
         * */
        ListAdapter adapter = new SimpleAdapter(this, contactList,
                R.layout.activity_list,
                new String[] { TAG_NAME }, new int[] {
                        R.id.name });

        setListAdapter(adapter);

        // selecting single ListView item
        ListView lv = getListView();

        // Launching new screen on Selecting Single ListItem
        lv.setOnItemClickListener(new OnItemClickListener() {

            @Override
            public void onItemClick(AdapterView<?> parent, View view,
                    int position, long id) {

            }
        });
    }
}

```

By using above code i am **able to fetch list of Events and Operatives**, but don't know how to show only required Operatives for an Event.....not all the Operatives...
like i want whenever **user do tap on Summer Festival**, then i just need to show only ***two Operatives*** namely, *Operative 2 and Operative 4*....