I have this format as of now when I exposed my data into JSON format(the default one):
```
{
"name": "cp",
"elements": [
{
"reference": "beta5",
"ordernumber_0": 8008,
"product": "gaiytaqw",
"what": "sagar",
"application": "user123459",
"datetime": "2021-05-09T10:58:51.000Z",
"timestamp": "2021-05-10T10:58:51Z"
}
],
"links": [
{
"rel": "self",
"href": "http://localhost:9090/server/admin/cp/views/cp?$format=json"
}
]
}
```
I want a different set of structure like this:
```
{
"WebsiteData":
{
"Data":{
"Topic":{
"what": "sagar",
"applicationnam": "user 3459",
"datetime": "2021-05-09T10:58:51.000Z",
"timestamp": "2021-05-10T10:58:51Z",
"Topic2": {
"applicationnam": "user ",
"datetime": "2021-05-09T10:58:51.000Z",
"timestamp": "2021-05-10T10:58:51Z"
}
},
"links": [
{
"rel": "self",
"href": "http://localhost:9090/server/admin/cp/views/cp?$format=json"
}}
```
1. How can I set the format like this, kindly see mainly: Websitedata, data, Topic and Topic2
2. the source is JSON and output API will be JSON : I dont think XSLT will work?
******************************************************************************************EDIT : I am able to generate this structure till now:
My Topic2 has came into single column using NEST function and Gruop by on (applicationnam,datetime,timestamp,what)
"Topic2": {
"applicationnam": "user ",
"datetime": "2021-05-09T10:58:51.000Z",
"timestamp": "2021-05-10T10:58:51Z"
}
},
"links": [
{
"rel": "self",
"href": "http://localhost:9090/server/admin/cp/views/cp?$format=json"
}}