JTRTech
1
Having an issue with the api.Entity().Data().Update() helper.
The only reason I can deduce is my JSON response returns a unquoted number;
{
"booking_id":11053,
"booking_arrival":"2015-11-18 14:00:00",
"booking_departure":"2015-11-21 10:00:00",
"booking_status":"Arrived",
"booking_adults":"2",
This is my test script;
I can get a response of the number for booking_id
If I change the helper to use the booking_id i get;
emre
2
Update function accepts string data. Ensure you’re sending a string. For example try responseObject.booking_id +''
;
1 Like
JTRTech
3
This is along the lines of what was thinking, believe the Json is valid as “quotes” not needed on number values I think.
So add a space after to make it a string rather than number. Did try changing the entity field to number but didn’t help.
QMcKay
4
Not even a space. Just appending empty quotes will turn the variable into a string.
1 Like
JTRTech
5
Thanks will try tomorrow, off for Christmas lunch with family, happy Christmas everyone
1 Like