I have JSON input data as
{
"type": "insert",
"timestamp": 1536959101000,
"binlog_filename": "mysql-bin-changelog.234234",
"binlog_position": 223,
"database": "test",
"table_name": "demo",
"table_id": 138,
"columns": [
{
"id": 1,
"name": "id",
"column_type": 12,
"value": "IboECKV "
},
{
"id": 2,
"name": "col2",
"column_type": 93,
"value": "Fri Sep 14 21:05:02 UTC 2018"
},
{
"id": 3,
"name": "col3",
"column_type": 4,
"value": 10
},
{
"id": 4,
"name": "col4",
"column_type": 4,
"value": 0
}
]
}
If column_type =93 (datetime): convert value to : yyyy-MM-dd HH:mm:ss.SSSZ
So the the target out put is
[
{
"id": "IboECKV "
},
{
"col2": "2018-09-14 21:05:02.000Z"
},
{
"col3": 10
},
{
"col4": 0
}
]
Do you know how to solved that case?
Many thanks,