Hi! I’m new at postman flows and at this moment i’m trying to get info from severals apis. From one of them i got this workflows, levels and groups
[
[
{
“workflow”: 39,
“description”: “sector de administracion”,
“level”: [
{
“workflow”: 39,
“level”: 1,
“groups”: [
63
]
},
{
“workflow”: 39,
“level”: 2,
“groups”: [
35
]
},
{
“workflow”: 39,
“level”: 3,
“groups”: [
27
]
}
]
}
],
…
from other i got groups and users
[
{
“group”: 25,
“description”: “Grupo 1”,
“users”: [
“User1”
]
},
{
“group”: 24,
“description”: “Grupo 1b”,
“users”: [
“User2”,
“User3”
]
},
…
How can y get some similiat to
[
[
{
“workflow”: 39,
“description”: “Administracion y Finanzas”,
“with_oc”: “0.00”,
“without_oc”: “0.00”,
“level”: [
{
“workflow_level”: 126,
“workflow”: 39,
“level”: 1,
“approvers_quantity”: 1,
“groups”: [
{
“group”: 63,
“description”: “Grupo63”,
“users”: [
“User1”
]
}
]
},
{
“workflow_level”: 127,
“workflow”: 39,
“level”: 2,
“approvers_quantity”: 1,
“groups”: [
{
“group”: 35,
“description”: “Grupo65”,
“users”: [
“User2”
]
}
]
},
{
“workflow_level”: 128,
“workflow”: 39,
“level”: 3,
“approvers_quantity”: 1,
“groups”: [
{
“group”: 27,
“description”: “Grupo27”,
“users”: [
“userGrupo27”
]
}
]
}
]
}
],
…
I need to join those complex objetcs into one! …
I confuse using $map or $merge… I cant do it… I think I need to iterate every json list with foreach but in fact i cant find foreach as a block in postman flows.
Someone can help me please?
thanks a lot!