Yes, you can flatten JSON in Airbyte using the Con...
# ask-ai
k
Yes, you can flatten JSON in Airbyte using the Connector Builder UI. Specifically, you can handle fields nested in arrays by setting the appropriate Field Path. For example, if your records are nested within an array in the JSON response, you can use a Field Path with a placeholder
*
to select all children at the current position in the path. Here’s an example based on the provided knowledge source: Given a JSON structure like this:
Copy code
json {   "data": [     {       "record": {         "id": "1"       }     },     {       "record": {         "id": "2"       }     }   ] }
You can set the Field Path to
data
,
*
,
record
to flatten the records and get the following result:
Copy code
json [   {     "id": 1   },   {     "id": 2   } ]
This approach allows you to extract and flatten nested records effectively. For more details, you can refer to the [Fields nested in arrays](https://docs.airbyte.com/connector-development/connector-builder-ui/record-processing#fields-nested-in-arrays) section in the Airbyte documentation.