search

Home  >  Q&A  >  body text

Please tell me how to convert this kind of array

"role_ids": [

10,

2,

1

How to convert to this form

"roles": [ "roleId": 1, "roleName": "Administrator", "comments": null, "isDelete": null, "createTime": null, "createTime": null, "updateTime": null }, "roleId": 2, "roleName": "Normal user", "comments": null, "isDelete": null, "createTime": null, "updateTime": null                                                                                                                           ]

手机用户1591066273手机用户1591066273875 days ago1366

reply all(2)I'll reply

  • autoload

    autoload2022-06-24 09:26:14

    First thing you should note is that the following form is a json string, and the one used in php is json_encode

    reply
    0
  • 手机用户1591066273

    I get it, thank

    手机用户1591066273 · 2022-06-24 09:55:12
  • Cancelreply