I am trying to match specific values from payload and return only the matched array value using dataweave expression.
Input:
name: QA
Payload:
{
"kind": "drive#driveList",
"nextPageToken": "~!!~AI9FV7TFuXfzyGg-txFqJWTa2oDXcgJ3ULdaNmst8",
"drives": [
{
"kind": "drive#drive",
"id": "0AKrgo4Gdm2hzUk9PVA",
"name": "Dev"
},
{
"kind": "drive#drive",
"id": "0AGymmOhxiCGwUk9PVA",
"name": "EHS Safety - Public"
},
{
"kind": "drive#drive",
"id": "0AAD3jo6D8PX-Uk9PVA",
"name": "Job Master folder"
},
{
"kind": "drive#drive",
"id": "0AI1WUfEk8cWkUk9PVA",
"name": "MSTemplates"
},
{
"kind": "drive#drive",
"id": "0AC_FdkeL63mHUk9PVA",
"name": "QA"
}
]
}
Expected output should be like output:
{
"kind": "drive#drive",
"id": "0AC_FdkeL63mHUk9PVA",
"name": "QA"
}
how can i achieve this?