Is this a json object or an json array?

use jquery to encapsulate ajax to request the server to return data. Is this a json string or a json array? if you want to call username under data, how to call it? thank you for your answers.

Mar.09,2021

var a = `{
    'success': true,
    'code': '00',
    'm3g': '',
    'data': [{
        'user_no': '100033',
        'username': 'hhoo',
        'headpic_url': 'https://img.codeshelper.com/upload/img/2021/03/09/53vt2sbfgpy5681.jpg',
        'new_mag': ''
    }]
}`
a = a.replace(/'/g, '"');
var c = JSON.parse(a);

console.log(c.data[0].username);

var ss= JSON.parse (response.data)
console.log (ss [0] .name)


first returns a JSON object, how to distinguish between an object and an array:
in JSON [] is Array (that is, an array) and {} is Ojbect (that is, an object).

if the value is

, it is mentioned above

var data = JSON.parse(jsonData)
data[0].username
.
Menu