Php Get Last Array Element In Javascript Object