我正在使用ngx-cookie-service包
{
"user": [
{
"id": 109,
"name": "name1",
"job" : "job name"
}
],
"token":"xxxx"
}
this.cookieService.set( 'user_id', result.user.id );
this.cookieService.set( 'user_name', result.user.name );
this.cookieService.set( 'user_job', result.user.job );
如何将其保存为 JSON 数组而不是保存个人?
像this.cookieService.set( 'user', result.user );