0 votes
in JavaScript by
How do you define JSON arrays in Javascript?

1 Answer

0 votes
by

JSON arrays are written inside square brackets and arrays contain javascript objects. For example, the JSON array of users would be as below,

"users":[
  {"firstName":"John", "lastName":"Abrahm"},
  {"firstName":"Anna", "lastName":"Smith"},
  {"firstName":"Shane", "lastName":"Warn"}
]
...