I’m having trouble getting the output below based on the following documents that I have. I would like to join the Queries document against several types of documents (workspace, folder, collection) and include the name from each. Any help would be appreciated.
Queries document:
{
"queries": [
{
"filters": [
{
"type": "collection",
"value": "1641c9ec-50f6-4f47-a35a-a31c51dd23a2"
},
{
"type": "metadata",
"name": "CreatorTool:Capture One 7 Macintosh",
"value": "CreatorTool:Capture One 7 Macintosh"
},
{
"type": "workspace",
"value": "3865"
},
{
"type": "folder",
"value": "5bf72f0a-9034-4901-be3c-ac586155d985"
}
]
}
]
}
Workspace document:
{
"type": "workspace",
"id": "3865",
"name": "name"
}
Collection document
{
"type": "collection",
"id": "1641c9ec-50f6-4f47-a35a-a31c51dd23a2",
"name": "name"
}
Folder document:
{
"type": "folder",
"id": "5bf72f0a-9034-4901-be3c-ac586155d985",
"name": "name"
}
I would like the output to be:
{
“queries”: [
{
“filters”: [
{
“type”: “collection”,
“value”: “1641c9ec-50f6-4f47-a35a-a31c51dd23a2”,
“name”: “name”
},
{
“type”: “metadata”,
“name”: “CreatorTool:Capture One 7 Macintosh”,
“value”: “CreatorTool:Capture One 7 Macintosh”
},
{
“type”: “workspace”,
“value”: “3865”,
“name”: “name”
},
{
“type”: “folder”,
“value”: “5bf72f0a-9034-4901-be3c-ac586155d985”,
“name”: “name”
}
]
}
]
}