Skip to main content
InterviewHubPRO
Section Overview
Q153

Question 153 of 536

Part 3: DOM, Event Flow, Timers & Browser APIs (104 - 173)

29%
JavaScript & V8 Internals (536 Qs)•Part 3: DOM, Event Flow, Timers & Browser APIs (104 - 173)

How do you define JSON arrays

junior LevelCode ExampleData StructuresHTTP & REST APIs

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

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