Assigning variable, its easy i know but i'm being stupid!

i’m using:

     if (matchStatus == "fixture") 
{
    startingpoint = [];
    startingpoint = i;
} 

to trace where fixture attributes are found in xml.

it returns something like:

4
5
6
7
8
is there a way i can set the first value returned (ie “4”) to a variable?

it tried to use:

 varX = startingpoint[0];

but no luck