Hello there,
I’m trying to check a value from the JSON respond I get.
The JSON Body I get is:
{
"HolidayRightsResults": [
{
"NiszNumber": "78121925128",
"HolidayRights": [
{
"AFWZ_TYP": "01",
"BGN_DAT": "2019-01-01T00:00:00",
"BGN_SLD_OPN_DG": 20.00,
"BGN_SLD_OPN_URN": 152.00,
"BRK_RCHT_DG": 20.00,
"BRK_RCHT_URN": 152.00,
"DSSR_NR": "1HI0269",
"DateIn": "2014-08-01T00:00:00",
"DateOut": null,
"END_DAT": "2020-01-01T00:00:00",
"OPGN_DG": 4.00,
"OPGN_URN": 30.40,
"Hrk_cod": "S",
"WNNR": "0001876",
"OPGB_RCHT_URN": 152.00,
"OPGB_RCHT_DGN": 20.00,
"RCHT_DG_WZG_DT": "2019-08-21T07:51:21.296431",
"RCHT_URN_WZG_DT": "2019-08-21T07:51:21.296431",
"RCHT_EXPRT_DT": "2019-08-21T07:51:37.309306"
}
],
"CalculationMessages": []
}
]
}
What I’m trying to do is to check the NiszNumber.
My test script is:
var response = JSON.parse(responseBody);
tests["Nisznumber is 78121925128"] = response.HolidayRightsResults.NiszNumber == 78121925128;
All I’m getting is an error.