Hi,
I am trying to change the key name based on the value it contains. I need help in transforming the output based in the following input JSON
{
"id": "3240",
"files" : {
"FileName3": "mac-20200806.json",
"FileName2": "window-20200806.json",
"FileName1": "linux-20200806.json"
}
}
Output
{
"id": "3240",
"files" : {
"macFile": "mac-20200806.json",
"windowFile": "window-20200806.json",
"linuxFile": "linux-20200806.json"
}
}
There can be any number for files but the file name will always start with mac, windows or Linux