Add List user's organizations id and roles to the token

Hello!
I’m trying to create a rule or something to add the list user’s organizations and it’s roles to the token…:
for example the token would be something like this:

{
“roles”: [
“REGULAR”,
“SUPERADMIN”
],
“iss”: “https://example.eu.auth0.com/”,
“sub”: “auth0|000123123000”,
“aud”: [
https://example//api/v1/”,
https://example.eu.auth0.com/userinfo
],
“iat”: 1653295571,
“exp”: 1653303631,
“azp”: “cp2hivXUCzelTGKp4WQymFibf39GZs3O”,
"organizations: [{org1Id: 12345, roles:[“Regular-User, Admin”]}, {org2Id: 131231241, roles:["READER, SUPER ADMIN]}…]

}

I hope you can help me!!