Ask Your Question
3

What is the appropriate JSON format for multiple objects?

asked 2023-02-16 11:00:00 +0000

nofretete gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-05-22 22:00:00 +0000

ladyg gravatar image

The appropriate JSON format for multiple objects is to enclose them within square brackets [ ]. Each object should be separated by a comma. For example:

[
  {
    "name": "John",
    "age": 30
  },
  {
    "name": "Mary",
    "age": 25
  },
  {
    "name": "Peter",
    "age": 40
  }
]

This is an array of three objects, each with a name and age property.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-02-16 11:00:00 +0000

Seen: 16 times

Last updated: May 22 '21