Values within an array are shown in the console, but not in the browser (JSON format)

46
May 19, 2019, at 11:30 AM

I have a variable that have the following data:

speedSiteInfo: [
    pageMetrics: {
      Timestamp: 34342.89703,
      Documents: 11,
      Frames: 5,
      JSEventListeners: 109,
      Nodes: 1592,
      LayoutCount: 25,
      RecalcStyleCount: 34,
      LayoutDuration: 0.204437,
      RecalcStyleDuration: 0.055527,
      ScriptDuration: 0.36874,
      TaskDuration: 0.933766,
      JSHeapUsedSize: 13390576,
      JSHeapTotalSize: 22327296
    },
    fullyLoadMetrics: 1.56247
  ],

The code above represents the information that was shown by console.log, which exists within a variable called speedSiteInfo.

In my case I need to return this data in JSON format with others informations, as shown below:

var arrayValues = {'totalRequest': 22, 'speedSiteInfo': speedSiteInfo, 'data': '2019-05-17'};
console.log(arrayValues);
res.send({arrayValues});

When I use console.log(arrayValues), I can see the data inside speedSiteInfo. But in the browser I only see this result:

{"arrayValues":{"totalRequest":22,"speedSiteInfo":[],"totalRequest":"2019-05-17"}}

Why this is happening, and how do I solve it?

READ ALSO
Search for a string name inside object with spaces

Search for a string name inside object with spaces

I have an object like this which contain a string name with whitespaces :

12
Empty return of variable

Empty return of variable

I have this code:

44
How do I host my React App with Namecheap?

How do I host my React App with Namecheap?

So previously I've deployed React Apps on Heroku and Github and never had a problem but now when I try and get a dang app up on Namecheap's hosting I'm having a million problems

31
How to write to different sections of a window using console.log in node.js?

How to write to different sections of a window using console.log in node.js?

I'm wondering if it's possible to write to different sections/portions of a nodejs terminal window when I log output

11