Hello,
Using PB 2022 B 1900
Receiving data from as a json string.
[
{
"selection": "Y",
"code": "001",
"debit": "2878.89",
"credit": "9878.00"
}
]
Here all values received are string values. Need to import the data into a datawindow, where column for debit and credit is numeric datatype and code is string datatype in datawindow. Trying to import the data into a datawindow using ImportJSONByKey.
Selection and code get imported as both datatype matches, but values for debit and credit fails to import due to mismatch in datatype.
ImportJSON and ImportJSONByKey gives the performance advantage.
Inserting every row by reading the JSON by converting the required data. It works, but slow.
Is there any way to use the ImportJSON that could convert the selected column's datatype [not all, column code should not be converted ]?
Or any other ways (methods) to modify the JSON values of a selected columns? Result to be like this
[
{
"selection": "Y",
"code": "001",
"debit": 2878.89, <- No quote
"credit": 9878.00 <- No quote
}
]
Happiness Always
BKR Sivaprakash