cancel
Showing results for 
Search instead for 
Did you mean: 

Append fields to a existing JSON

walkerline117
Contributor

Hi,

How do I append some hardcode json string into an exsting json document.

For example, my Oracle select Snapl returns below as output

[{“DEGREE_ID”:269,“DEGREE_NAME”:“1. Staatsexamen”},
{“DEGREE_ID”:270,“DEGREE_NAME”:“1. jur. Staatsexamen”},
{“DEGREE_ID”:273,“DEGREE_NAME”:“1. med. Staatsexamen”}]

as you can see each row returns as on doc.

How can I transforme it to

{
“apiVersion”: “1.0”,
“educationDegrees”: [{“DEGREE_ID”:269,“DEGREE_NAME”:“1. Staatsexamen”},
{“DEGREE_ID”:270,“DEGREE_NAME”:“1. jur. Staatsexamen”},
{“DEGREE_ID”:273,“DEGREE_NAME”:“1. med. Staatsexamen”}]
}

As you can see I just added some hardcode fields on top of my response.

Thanks

1 REPLY 1

nganapathiraju
Former Employee

Please look at this post