Convert List To JSON (Based on Values)
2 min
Convert a JSON Object List to JSON using the values of the input list as key names and values in the output list
API Definition
Convert List Format API
Call the following API:
POST
https://orca.pathfix.com/functions/list/tojson
{
"input": [{
"question": "Please enter your name",
"answer": "Ron"
},
{
"question": "Please enter your Title",
"answer": "Mr."
}
],
"key": "question",
"value": "answer",
"key_length": "100"
}
Remarks
The rule key in the request is optional.
If drop_nulls is omitted, then in the above scenario, the second item of the output list would have fullName with empty quotes