0

I just want to know is there a way by which variable names can by set dynamically . For example this is sample json data

let obj={
    "data_type": "data according to date",
    "status_message": "",
    "data": []
}

I want to add new variable array in obj.data according to date automatically. I'll be getting new data everyday so instead of appending in single node , i want it to be in different node according to date.

new format of json

new format of json

Sorry if this is a noob question, but i couldn't find answer anywhere.

Eddie
  • 26,593
  • 6
  • 36
  • 58
Nitin yadav
  • 194
  • 2
  • 8

0 Answers0