Hi All,
I have a JSON source that sends its data that I display on my web page. Problem is, the Date part that it is returning is some sort of a javascript object.
Please look at the sample response.
dteInstallDate
date 16
day 4
hours 0
minutes 0
month 8
nanos 0
seconds 0
time 1284566400000
timezoneOffset -480
year 110
When I try to print the object as console.log. It prints
data.resource_data.dteInstallDate.toString()
[object Object]
My problem is that I want to set this JSON response into my Jquery hidden input it updates the data into Object Object.
$("div#pmItems").find("#dteInstallDate").val(data.resource_data.dteInstallDate);
I am having thoughts on how to send Date object from Server Side into Javascript. Should I just convert it to string or send it as a long value. Which one do you think is better?
I have Spring MVC as my backend