โ06-06-2024 12:03 PM
I have a custom connector which I am creating a output field schema for.
The HTTP response is JSON in the following format:
{
Key: [
[
"string",
"string2",
"..."
]
],
Key2: "String",
Key3: "integer",
}
Here is a sample:
{...
"user_usage": [
[
"user-agent",
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.81 Safari/537.36 Edg/104.0.1293.54"
],
[
"user-agent",
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
],
],
"server_name": "THIS IS A SERVER",
...
}
How do I create the field definition schema for this Nested Array of a Nested Array? I've tried the below schema but it doesn't seem to work correctly. Looking through the docs, it seems to only accept a nested object for array "of" and not a nested array.
{
name:"user_usage",
type: "array",
of: "object",
properties:[
{
type:"array",
of: "string"
}
]
},
Solved! Go to Solution.
โ06-06-2024 02:56 PM
I got this to work for me in a recipe (not in the SDK):
[
{
"name": "outer_array",
"type": "array",
"optional": false,
"properties": [
{
"name": "array",
"type": "array",
"of": "string",
"control_type": "text",
"label": "Array"
}
],
"of": "object",
"label": "Outer array"
}
]
It's weird that the outer array is "of object", but it seems to be correct.
โ06-06-2024 02:56 PM
I got this to work for me in a recipe (not in the SDK):
[
{
"name": "outer_array",
"type": "array",
"optional": false,
"properties": [
{
"name": "array",
"type": "array",
"of": "string",
"control_type": "text",
"label": "Array"
}
],
"of": "object",
"label": "Outer array"
}
]
It's weird that the outer array is "of object", but it seems to be correct.
โ06-17-2024 09:51 AM
Thanks this worked!