"roleName" : "超级管理员1986" , "createdAt" : "2020-10-23T01:47:22.000000Z" , "updatedAt" : "2020-10-24T13:16:43.000000Z" } , { "id" : 396 , "roleName" : "编辑197" , "createdAt" : "2020-10-23T01:47:22.000000Z" , "updatedAt" : "2020-10-23T01:47:22.000000Z" } , { "id" : 395 , "roleName" : "超级管理员197" , "createdAt" : "2020-10-23T01:47:22.000000Z" , "updatedAt" : "2020-10-23T01:47:22.000000Z" } , { "id" : 394 , "roleName" : "编辑196" , "createdAt" : "2020-10-23T01:47:22.000000Z" , "updatedAt" : "2020-10-23T01:47:22.000000Z" } , { "id" : 393 , "roleName" : "超级管理员196" , "createdAt" : "2020-10-23T01:47:22.000000Z" , "updatedAt" : "2020-10-23T01:47:22.000000Z" } , { "id" : 392 , "roleName" : "编辑195" , "createdAt" : "2020-10-23T01:47:22.000000Z" , "updatedAt" : "2020-10-23T01:47:22.000000Z" } , { "id" : 391 , "roleName" : "超级管理员195" , "createdAt" : "2020-10-23T01:47:22.000000Z" , "updatedAt" : "2020-10-23T01:47:22.000000Z" } , { "id" : 390 , "roleName" : "编辑194" , "createdAt" : "2020-10-23T01:47:22.000000Z" , "updatedAt" : "2020-10-23T01:47:22.000000Z" } , { "id" : 389 , "roleName" : "超级管理员194" , "createdAt" : "2020-10-23T01:47:22.000000Z" , "updatedAt" : "2020-10-23T01:47:22.000000Z" } , { "id" : 388 , "roleName" : "编辑193" , "createdAt" : "2020-10-23T01:47:22.000000Z" , "updatedAt" : "2020-10-23T01:47:22.000000Z" } , { "id" : 387 , "roleName" : "超级管理员193" , "createdAt" : "2020-10-23T01:47:22.000000Z" , "updatedAt" : "2020-10-23T01:47:22.000000Z" } , { "id" : 386 , "roleName" : "编辑192" , "createdAt" : "2020-10-23T01:47:22.000000Z" , "updatedAt" : "2020-10-23T01:47:22.000000Z" } , { "id" : 385 , "roleName" : "超级管理员192" , "createdAt" : "2020-10-23T01:47:22.000000Z" , "updatedAt" : "2020-10-23T01:47:22.000000Z" } , { "id" : 384 , "roleName" : "编辑191" , "createdAt" : "2020-10-23T01:47:22.000000Z" , "updatedAt" : "2020-10-23T01:47:22.000000Z" } , { "id" : 383 , "roleName" : "超级管理员191" , "createdAt" : "2020-10-23T01:47:22.000000Z" , "updatedAt" : "2020-10-23T01:47:22.000000Z" interface IRole { id : number roleName : string createdAt : string updatedAt : string // jsonStr为你的json数据 const roleList : IRole [] = < Array < IRole >> JSON . parse (jsonStr) console . log (roleList)

总结一下,我们用到ts中的知识

分类:
前端
标签: