title: Cannot retrieve query.start-index variable from Google Analytics Core Reporting Results JSON Object
body: <p>I am building a Google Analytics Dashboard and have it pretty completed, but am just totally stumped on this one thing that is really hanging me up.</p>
  
  <p>When I query the GA Core Reporting API for a dataset, I successfully get and am able to display results and everything works fine EXCEPT I am not able to query the JSON object for the "start-index". That is, the first row that it will display (default = 1, but GA only returns 10k rows at a time, so if you have a data set with >10k rows, this becomes critically important!).</p>
  
  <p>To attempt to get this integer, I use</p>
  
  <pre><code>$start = $results-&gt;query.start-index;
  </code></pre>
  
  <p>and as a check to make sure I am not insane, "max-results" is right next to "start-index" in the JSON object and this works fine:</p>
  
  <pre><code>$max = $results-&gt;totalResults;
  </code></pre>
  
  <p>Here is the GA JSON object (per <a href="https://developers.google.com/analytics/devguides/reporting/core/v3/reference#startIndex" rel="nofollow">https://developers.google.com/analytics/devguides/reporting/core/v3/reference#startIndex</a>)</p>
  
  <pre><code>{
  "kind": "analytics#gaData",
   "id": string,
  "selfLink": string,
  "containsSampledData": boolean,
  "query": {
    "start-date": string,
    "end-date": string,
    "ids": string,
    "dimensions": [
      string
    ],
    "metrics": [
      string
    ],
    "sort": [
      string
    ],
    "filters": string,
    "segment": string,
    "start-index": integer,
    "max-results": integer
  },
  "itemsPerPage": integer,
  "totalResults": integer,
  "previousLink": string,
  "nextLink": string,
  "profileInfo": {
    "profileId": string,
    "accountId": string,
    "webPropertyId": string,
    "internalWebPropertyId": string,
    "profileName": string,
    "tableId": string
  },
  "columnHeaders": [
    {
      "name": string,
      "columnType": string,
      "dataType": string
    }
  ],
  "rows": [
    [
      string
    ]
  ],
  "totalsForAllResults": [
    {
      metricName: string,
      ...
    }
  ]
  }
  </code></pre>
  
  <p>Help! Thanks in advance</p>