How to get Total number of Records of a Table using MySQL

I want to calculate total Records in a table using MySQL. For this I am using command:
SELECT COUNT(*) as n from Dumpers;

This gives me:

n
2

In JSON:

[
  {
    "n": 2
  }
]


Now, What should be the command to access this value ā€˜nā€™, i.e 2.

{{NumberOfDumpers.data}}


???

This is how to access the value:
{{NumberOfDumpers.data[0].n}}

1 Like

Thanks @Amelia . The command worked great. I was able to get the n value.

1 Like