En el menú de navegación de la izquierda, haga clic en Integraciones para abrir la página Integraciones.
Seleccione una integración o cree una haciendo clic en Crear integración.
Si vas a crear una integración:
Escribe un nombre y una descripción en el cuadro de diálogo Crear integración.
Selecciona una región para la integración.
Selecciona una cuenta de servicio para la integración. Puede cambiar o actualizar los detalles de la cuenta de servicio de una integración en cualquier momento desde el panel infoResumen de la integración de la barra de herramientas de integración.
Haz clic en Crear.
Se abrirá la integración en el editor de integraciones.
En el editor de integraciones, haga clic en el publishmenú de carga o descarga y, a continuación, seleccione Subir integración.
En el cuadro de diálogo del explorador de archivos, seleccione el archivo que ha guardado en el paso 1 y, a continuación, haga clic en Abrir.
Se crea una nueva versión de la integración con el archivo subido.
En el editor de integraciones, haga clic en Probar.
Haz clic en Test integration (Probar integración). De esta forma, se ejecuta la integración y se muestra el resultado de la ejecución en el panel Probar integración.
[[["Es fácil de entender","easyToUnderstand","thumb-up"],["Me ofreció una solución al problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Es difícil de entender","hardToUnderstand","thumb-down"],["La información o el código de muestra no son correctos","incorrectInformationOrSampleCode","thumb-down"],["Me faltan las muestras o la información que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-11 (UTC)."],[[["\u003cp\u003eThis content provides a guide on merging two JSON arrays within Application Integration using the Data Mapping task.\u003c/p\u003e\n"],["\u003cp\u003eThe process involves using the "MERGE" function within the transformation functions of the Data Mapping task configuration.\u003c/p\u003e\n"],["\u003cp\u003eThe sample code provided demonstrates how to configure the task to merge two JSON arrays, 'inputJsonArray1' and 'inputJsonArray2', into a new array, 'outputJsonArray'.\u003c/p\u003e\n"],["\u003cp\u003eInstructions are provided on how to upload the provided sample integration .json file into the Application Integration environment and test its functionality.\u003c/p\u003e\n"],["\u003cp\u003eThe sample integration uses an API trigger and shows a simple integration flow layout in an image.\u003c/p\u003e\n"]]],[],null,["# Merge two JSON arrays\n\nSee the [supported connectors](/integration-connectors/docs/connector-reference-overview) for Application Integration.\n\nMerge two JSON arrays\n=====================\n\n\nUsing the Data Mapping task, merge two JSON arrays, and store the resultant output in a new JSON variable.\n\nCode sample\n-----------\n\n {\n \"triggerConfigs\": [{\n \"label\": \"API Trigger\",\n \"startTasks\": [{\n \"taskId\": \"1\"\n }],\n \"properties\": {\n \"Trigger name\": \"test_string_case_conversion_API_1\"\n },\n \"triggerType\": \"API\",\n \"triggerNumber\": \"1\",\n \"triggerId\": \"api_trigger/test_string_case_conversion_API_1\"\n }],\n \"taskConfigs\": [{\n \"task\": \"FieldMappingTask\",\n \"taskId\": \"1\",\n \"parameters\": {\n \"FieldMappingConfigTaskParameterKey\": {\n \"key\": \"FieldMappingConfigTaskParameterKey\",\n \"value\": {\n \"jsonValue\": \"{\\n \\\"@type\\\": \\\"type.googleapis.com/enterprise.crm.eventbus.proto.FieldMappingConfig\\\",\\n \\\"mappedFields\\\": [{\\n \\\"inputField\\\": {\\n \\\"fieldType\\\": \\\"JSON_VALUE\\\",\\n \\\"transformExpression\\\": {\\n \\\"initialValue\\\": {\\n \\\"referenceValue\\\": \\\"$inputJsonArray1$\\\"\\n },\\n \\\"transformationFunctions\\\": [{\\n \\\"functionType\\\": {\\n \\\"jsonFunction\\\": {\\n \\\"functionName\\\": \\\"MERGE\\\"\\n }\\n },\\n \\\"parameters\\\": [{\\n \\\"initialValue\\\": {\\n \\\"referenceValue\\\": \\\"$inputJsonArray2$\\\"\\n }\\n }]\\n }]\\n }\\n },\\n \\\"outputField\\\": {\\n \\\"referenceKey\\\": \\\"$outputJsonArray$\\\",\\n \\\"fieldType\\\": \\\"JSON_VALUE\\\",\\n \\\"cardinality\\\": \\\"OPTIONAL\\\"\\n }\\n }]\\n}\"\n }\n }\n },\n \"taskExecutionStrategy\": \"WHEN_ALL_SUCCEED\",\n \"displayName\": \"Data Mapping\"\n }],\n \"integrationParameters\": [{\n \"key\": \"outputJsonArray\",\n \"dataType\": \"JSON_VALUE\",\n \"displayName\": \"outputJsonArray\"\n }, {\n \"key\": \"inputJsonArray1\",\n \"dataType\": \"JSON_VALUE\",\n \"defaultValue\": {\n \"jsonValue\": \"[{\\n \\\"name\\\": \\\"Abhishek\\\",\\n \\\"course\\\": \\\"Mechanical\\\"\\n}, {\\n \\\"name\\\": \\\"Chirag\\\",\\n \\\"course\\\": \\\"Civil\\\"\\n}, {\\n \\\"name\\\": \\\"Sachin\\\",\\n \\\"course\\\": \\\"Medical\\\"\\n}, {\\n \\\"name\\\": \\\"Vivek\\\",\\n \\\"course\\\": \\\"Software\\\"\\n}]\"\n },\n \"displayName\": \"inputJsonArray1\",\n \"jsonSchema\": \"{\\n \\\"$schema\\\": \\\"http://json-schema.org/draft-04/schema#\\\",\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"name\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"course\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n }\\n }\\n}\"\n }, {\n \"key\": \"inputJsonArray2\",\n \"dataType\": \"JSON_VALUE\",\n \"defaultValue\": {\n \"jsonValue\": \"[{\\n \\\"name\\\": \\\"Shubham\\\",\\n \\\"course\\\": \\\"IT\\\"\\n}, {\\n \\\"name\\\": \\\"Dravid\\\",\\n \\\"course\\\": \\\"Mechanical\\\"\\n}]\"\n },\n \"displayName\": \"inputJsonArray2\",\n \"jsonSchema\": \"{\\n \\\"$schema\\\": \\\"http://json-schema.org/draft-04/schema#\\\",\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"name\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"course\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n }\\n }\\n}\"\n }],\n \"userLabel\": \"v1\"\n }\n\n### Sample integration flow\n\nThe following image shows a sample layout of the integration editor for this integration code sample.\n\n\nUpload and run the sample integration\n-------------------------------------\n\nTo upload and run the sample integration, do the following steps:\n\n1. Save the [integration sample](#code-sample) as a .json file on your system.\n2. In the Google Cloud console, go to the **Application Integration** page.\n\n [Go to Application Integration](https://console.cloud.google.com/integrations)\n3. Click **Integrations** from the left navigation menu to open the **Integrations** page.\n4. Select an existing integration or create a new integration by clicking **Create integration** .\n\n\n If you are creating a new integration:\n 1. Enter a name and description in the **Create Integration** dialog.\n 2. Select a region for the integration. **Note:** The **Regions** dropdown only lists the regions provisioned in your Google Cloud project. To provision a new region, Click **Enable Region** . See [Enable new region](/application-integration/docs/enable-new-region) for more information.\n 3. Select a service account for the integration. You can change or update the service account details of an integration any time from the info **Integration summary** pane in the integration toolbar. **Note:** The option to select a service account is displayed only if you have enabled integration governance for the selected region.\n 4. Click **Create**.\n\n\n This opens the integration in the *integration editor*.\n5. In the *integration editor* , click publish**Upload/download menu** and then select **Upload integration**.\n6. In the file browser dialog, select the file that you saved in step 1, and then click **Open** .\n\n A new version of the integration is created using the uploaded file.\n7. In the *integration editor* , click **Test**.\n8. Click **Test integration** . This runs the integration and displays the execution result in the **Test Integration** pane."]]