How to get arraylist inside arraylist where index = x
<p>Good day, this is my first time asking here at stack overflow so pardon for the mistakes that you will see in my question. </p>

<p>im new at web programming and angular. 
i created a list of prescription and inside the prescription there are list of medicines </p>

<pre><code>.controller('prescriptionTable',function($scope) {
var Prescription = [
    {id:1,secID:1,docID:1,medicine:[
        {name:"lozartan",quantity:2},
        {name:"biogesic",quantity:3},
        {name:"paracetamol",quantity:1},]
    },
    {id:2,secID:1,docID:1,medicine:[
        {name:"Lumiracoxib",quantity:2},
        {name:"Cloxacillin",quantity:3},
        {name:"Allopurinol",quantity:4}]
    },
];

$scope.Prescription = Prescription;
$scope.indexNum =0;
</code></pre>

<p>then i use ng-repeat so i can get the list of medicines</p>

<pre><code>&lt;div ng-controller="prescriptionTable"&gt;
    &lt;ul&gt;
        &lt;li ng-repeat="px in Prescription"&gt;
            {{px.id}}
            &lt;ul&gt;
                &lt;li ng-repeat="med in px.medicine"&gt;
                    Name: {{med.name}} , Quantity: {{med.quantity}}
                &lt;/li&gt;
            &lt;/ul&gt;
        &lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p>How can I filter the Prescription to show only the list of medicines of a certain prescription using $scope.indexNum? </p>

<p>thanks and cheers.</p>