In response, I get a big object with many data fields. I need a function that will be going through all properties of an object, and if it is a date, apply iml.parseDate(value)
for this field. This function must be universal for other modules.
I've noticed that typeof(date)
returns " string"
so I don't know how to do this.
[
{
"id": 13965629,
"updated_at": "2020-07-10 02:01 PM +0300",
"created_at": "2020-07-10 02:01 PM +0300",
"creator": {
"name":"Jon Doe",
"registered": "2020-06-22 12:31 PM +0100",
}
}
]
You can interate through your objects or arrays and match the date using regexp.
E.g.