Combine Lists By Key
1 min
Combines or Merges items from combine list into every JSON Object of the input list. The substitution rules are used to define what the output should be like. The two lists are combined by keys
API Definition
Combine One to Many API
Call the following API:
POST
https://orca.pathfix.com/functions/list/combine_by_key
{
"input": [
{
"questionId": "q1",
"answer": "Bruce Wayne"
},
{
"questionId": "q2",
"answer": "Wayne Enterprises"
}
],
"input_combine": [
{
"title": "Your first and last name",
"questionItem": {
"question": {
"questionId": "q1"
}
}
},
{
"title": "Company Name",
"questionItem": {
"question": {
"questionId": "q2"
}
}
}
],
"input_key": "questionId",
"input_combine_key": "questionItem.question.questionId",
"output": {
"q": "{{input_combine.title}}",
"a": "{{input.answer}}",
"q_id": "{{input.questionId}}"
}
}