-1

I need to get some data out of a json file. The issue I have in the output there is a blank in the column header. I already tried to replace the blenk with a "_" but this did not help. When I simply name it as it is I am getting the error: SyntaxError: Expected token '}' file:

Can you tell me how I need to manipulate the script to get the Data?

{
            tableData.push({
                "id" : id_temp,
                "datetime": feat[j].datetime,
                "Percent_Available_Memory": feat[j].Percent Available Memory,
                "Available_Memory": feat[j].Available_Memory,
                "Total_Memory": feat[j].Total Memory,
                "coverage": feat[j].coverage

            });
        }
cyberoner1
  • 51
  • 1
  • 7

1 Answers1

1

OK, try this:

"Percent_Available_Memory": feat[j]["Percent Available Memory"],

...

"Total_Memory": feat[j]["Total Memory"],
Maurice Perry
  • 9,261
  • 2
  • 12
  • 24