Jump to content

Tibco Data Virtualization Nested JSON


Krishna Gadde

Recommended Posts

Hi,

We have a source data in a relational database. We wanted to create a complex nested JSON structure using the tables from the source database. What is the best way to produce a nested JSON strucuture using relational data in TDV. After we produce the data in JSON format then we have to serve the data as REST JSON WebService. We are using 8.2 version and already tried the TDV JSON functions in a query but no luck.

Any help will be appreciated.

Thank You

 

Example JSON Structure Output:

{

"departments":[

{

"department_name":"ACCOUNTING",

"department_no":10,

"employees":[

{

"employee_number":7782,

"employee_name":"CLARK"

},

{

"employee_number":7839,

"employee_name":"KING"

},

{

"employee_number":7934,

"employee_name":"MILLER"

}

]

},

{

"department_name":"RESEARCH",

"department_no":20,

"employees":[

{

"employee_number":7369,

"employee_name":"SMITH"

},

{

"employee_number":7566,

"employee_name":"JONES"

},

{

"employee_number":7788,

"employee_name":"SCOTT"

},

{

"employee_number":7876,

"employee_name":"ADAMS"

},

{

"employee_number":7902,

"employee_name":"FORD"

}

]

},

{

"department_name":"SALES",

"department_no":30,

"employees":[

{

"employee_number":7499,

"employee_name":"ALLEN"

},

{

"employee_number":7521,

"employee_name":"WARD"

},

{

"employee_number":7654,

"employee_name":"MARTIN"

},

{

"employee_number":7698,

"employee_name":"BLAKE"

},

{

"employee_number":7844,

"employee_name":"TURNER"

},

{

"employee_number":7900,

"employee_name":"JAMES"

}

]

},

{

"department_name":"OPERATIONS",

"department_no":40,

"employees":null

}

]

}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...