How can i make json object from
{
"Public_Holiday": [{
"id": 1,
"date": "2018-12-31T15:59:14.000Z"
}]
}
Into this and add momentjs
{
"Public_Holiday": [{
"id": 1,
"date": "2019-1-1"
}]
}
And i tried to restructure json by doing
const items = await jsonfile.readFile('./json/data.json');
const objKey = Object.keys(items);
const json_struct = objKey.map((key) => {
tablename: key,
table: items[key]
})
So how can i filtered the json_struct with every object date and increment it by 1?