-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

            });
        }
1
  • So you want to write tableData as json? Commented Dec 20, 2016 at 7:49

1 Answer 1

1

OK, try this:

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

...

"Total_Memory": feat[j]["Total Memory"],
Sign up to request clarification or add additional context in comments.

1 Comment

Perfect, this is working. Thanks in advance

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.