Hi,
I built and API to calculate SLA and wanted to share it with the community to consume from other Ragic solutions.
The only issue I have is getting the value from a Ragic field in JS as the fields names are numeric.
I can get the value of: _create_date using:
var objSLA = JSON.parse(respSLA);
var x = objSLA.data._create_date;
But then I can’t get the value for field 1000525 using:
var y = objSLA.data.[‘1000525’];
or
var y = objSLA.data.‘1000525’
or
var y = objSLA.data.1000525
This is the full Json result.
{
“status”: “SUCCESS”,
“msg”: " ",
“ragicId”: 36,
“rv”: " ",
“data”: {
“1000519”: “37”,
“1000520”: “”,
“1000522”: “Yes”,
“1000523”: “2020/12/21 15:01:00”,
“1000524”: “120”,
“1000525”: “2020/12/22 08:01:00”,
“1000526”: “8”,
“1000527”: “17”,
“_ragicId”: 36,
“_star”: false,
“_create_date”: “2020/12/23 11:28:44”,
“_create_user”: “RagicSolutions@gmail.com”,
“index_calDates”: “d1000523 2020/12/21 15:01:00 d1000525 2020/12/22 08:01:00”,
“index_title”: “120”,
“index”: “”
}
}
Please can some help me.
Thanks