I have an object like below
[
  {
   "day"  : "monday",
   "value": 1
   },
  {
   "day"  : "tuesday",
   "value": 2
   },
   ...
]
Is there any native javascript way to replace the key with a new key. Here I need to replace the "day" & "value" with "x" & "y" respectively. (like below)
[
  {
   "x"  : "monday",
   "y": 1
   },
  {
   "x"  : "tuesday",
   "y": 2
   },
   ...
]
 
    