Following is the format of my HTTP Request JSON output.I want to convert into data table with column PROFITCENTERCD,PERIODID2_TSTAMP and BABUCGIDGRS.Need to neglect metadata from ‘results’ array and the remaining fields should be converted as a datacolumn. Thanks in advance.
Thanks for the quick reply, followed your steps and i am able to get the desired output.As a next step, is it possible to dynamically create the Datatable using the fields in the JSON Array.For Ex…In the above given JSON object i need to create datatable with columns PROFITCENTERCD,PERIODID2_TSTAMP,BABUCGIDGRS but it is not static the fields might change based on the endpoint.
Is it possible to format “PERIODID2_TSTAMP”: “/Date(1664668800000)/” to
“PERIODID2_TSTAMP”: “1664668800000)" before assigning to the datatable.
Because when this “PERIODID2_TSTAMP”: “/Date(1664668800000)/” is assigned to datatable it is automatically converting to date format which i dont want.Thanks in advance
Apologize for adding another topic here, will take care next time.
Where i have to incorporate your logic, my thought is before assigning the data to data table can we convert into unixnbr and assign? or we have to loop the datatable to do the conversion once it is created? pls let me know the code solution for the first approach if possible.Thanks
i am not sure why we have to identify the datatype.
Datatable is created and then can we use something like below to convert the PERIODID2_TSTAMP
column value to unixtime