Your data is into array. Try this.userDetails = data[0];
By the way… never send password user from database through api return
In Laravel you can dos this in your model user class :
<?php namespace App\Models\Core;
use App\Models\Sximo;
use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Model;
class Users extends Sximo {
protected $table = 'tb_users';
protected $primaryKey = 'id';
public function __construct() {
parent::__construct();
}
public static function querySelect( ){
return " SELECT tb_users.*, tb_groups.name
FROM tb_users LEFT JOIN tb_groups ON tb_groups.group_id = tb_users.group_id ";
}
public static function queryWhere( ){
return " WHERE tb_users.id !='' ";
}
public static function queryGroup(){
return " ";
}
}
As i see in the body response, the content is string value. _body: "[{“id”:9,“group_id”… instead of json or array
CAn you show your controller return value from Laravel side ?