Here is the response in json format retrieved from the API:
{
"columnHeaders": [
{
"columnName": "id",
"columnType": "bigint",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": true,
"columnValues": [],
"visibilityCriteria": []
},
{
"columnName": "client_id",
"columnType": "bigint",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": [],
"visibilityCriteria": []
},
{
"columnName": "countries",
"columnType": "int",
"columnLength": 0,
"columnDisplayType": "CODELOOKUP",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"displayName": "null",
"dependsOn": 0,
"orderPosition": 0,
"visible": false,
"mandatoryIfVisible": false,
"columnValues": [
{
"id": 19,
"value": "India",
"score": 0,
"parentId": 0
},
{
"id": 20,
"value": "USA",
"score": 0,
"parentId": 0
}
],
"columnCode": "countries",
"visibilityCriteria": []
}
}
]
I now need to include the following json data into my current json dataset.
"columnValuesLookup": [
{
"id": 19,
"value": "English",
"score": 0,
"parentId": 0
},
{
"id": 20,
"value": "SA",
"score": 0,
"parentId": 0
}
],
How can I insert this json data at a specific index within the existing json object so that the final json appears like below:
{
"columnHeaders": [
{
"columnName": "id",
"columnType": "bigint",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": true,
"columnValues": [],
"visibilityCriteria": []
},
{
"columnName": "client_id",
"columnType": "bigint",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": [],
"visibilityCriteria": []
},
{
"columnName": "countries",
"columnType": "int",
"columnLength": 0,
"columnDisplayType": "CODELOOKUP",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"displayName": "null",
"dependsOn": 0,
"orderPosition": 0,
"visible": false,
"mandatoryIfVisible": false,
"columnValues": [
{
"id": 19,
"value": "India",
"score": 0,
"parentId": 0
},
{
"id": 20,
"value": "USA",
"score": 0,
"parentId": 0
}
],
"columnValuesLookup": [
{
"id": 19,
"value": "English",
"score": 0,
"parentId": 0
},
{
"id": 20,
"value": "SA",
"score": 0,
"parentId": 0
}
],
"columnCode": "countries",
"visibilityCriteria": []
}
}
]