Below is the data being returned by an XDataServer using a get request. I'm wondering what options there are to format this data.
Can it return just the array of data (removing the "value" object)
Can we map the field names to an alias so they export using the alias rather than the actual database field names (i.e. COMP_ID could be exported as compID)
Also, are we able to "intercept" the url passed so we could reformat the syntax on any filtering in the url to a format xdata understands (or possibly interpret it and apply the filter directly)?
{
"value": [
{
"$id": 1,
"COMP_ID": "A",
"NAME_COMP": "Company A",
"STREET": null,
"PROVINCE_ID": "_"
},
{
"$id": 2,
"COMP_ID": "C",
"NAME_COMP": "The C company",
"STREET": "123 this is it street",
"PROVINCE_ID": "MN"
}
]
}
This was retrieved by an http get request from a javascript application.
I looked at the link and it says the response can be modified by tapping into the OnHeaders method of the response object. We could modify the response to remove the "value" object and just return the data array could we not?