The JSON for that array is:

["apple","orange","cat","dog"]

JSON for arrays is the same as Javascript array literals, except that JSON doesn't allow missing elements or an optional trailing comma. And the elements of the array have to be valid JSON, so you have to use double quotes around strings, you can't use single quotes like Javascript allows.

You generally shouldn't have to worry about how to format JSON yourself, most languages have library functions that do it for you. In JS you use JSON.stringify, in PHP you use json_encode().

Answer from Barmar on Stack Overflow
🌐
W3Schools
w3schools.com › js › js_json_server.asp
W3Schools.com
If the file contains a JSON array, response.json() returns a JavaScript array.
🌐
JSON Schema
json-schema.org › understanding-json-schema › reference › array
JSON Schema - array
In Python, "array" is analogous to the list or tuple type, depending on usage. However, the json module in the Python standard library will always use Python lists to represent JSON arrays.
🌐
JSON Formatter
jsonformatter.curiousconcept.com
JSON Formatter & Validator
The JSON Formatter & Validator beautifies and debugs JSON data with advanced formatting and validation algorithms.
🌐
JSON Formatter
jsonformatter.org
Best JSON Formatter and JSON Validator: Online JSON Formatter
Supports JSON Graph View of JSON String which works as JSON debugger or corrector and can format Array and Object.
Find elsewhere
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Learn_web_development › Core › Scripting › JSON
Working with JSON - Learn web development | MDN
2 weeks ago - If you load this JSON in your JavaScript program as a string, you can parse it into a normal object and then access the data inside it using the same dot/bracket notation we looked at in the JavaScript object basics article. For example: ... First, we have the variable name — superHeroes. Inside that, we want to access the members property, so we use .members. members contains an array populated by objects.
🌐
Stack Overflow
stackoverflow.blog › 2022 › 06 › 02 › a-beginners-guide-to-json-the-data-format-for-the-internet
A beginner's guide to JSON, the data format for the internet - Stack Overflow
June 2, 2022 - JSON is a human-readable format for storing and transmitting data. As the name implies, it was originally developed for JavaScript, but can be used in any language and is very popular in web applications.
🌐
Medium
medium.com › @apdharshi › difference-between-arrays-and-json-objects-fa1c8598f9f1
Difference between Arrays and JSON Objects | by APD | Medium
May 19, 2019 - Keys must be strings, and values must be a valid JSON data type (string, number, object, array, boolean or null). Format { “ ”: “ ” } Example {“position”: “winner”,”country”: “U.S.A”} { “binary”: [{“id”:1,”name”:0},{“id”:2,”name”:1}], “boolean”: [{“id”:1,”value”: false},{“id”:2,”value”: true}]} Nested Objects: “results”: { “tennis”: [ {“position”: “winner”,“country”: “U.S.A}, {“position”: “runner”,“country”: “China”} ]} JSON Objects are enclosed within {} “universe”: { “planets”: { “
🌐
JSON Formatter
jsonformatter.org › 83375b3b7666fb6edd4a34306fca483c
Json array
Supports JSON Graph View of JSON String which works as JSON debugger or corrector and can format Array and Object.
🌐
Codefinity
codefinity.com › courses › v2 › d797f15f-39dd-4abc-8cfd-0d898dd2b885 › 372339e2-bcc5-490c-a5ee-f4d51f680045 › e304b41b-64c3-4141-9977-18b5c16467ff
Learn JSON Arrays and Nested Objects | Understanding JSON Data
JSON arrays allow you to group multiple items together using square brackets []. Each item inside a JSON array can be a simple value, such as a number or string, or a more complex object.
🌐
CodeSignal
codesignal.com › learn › courses › parsing-json-with-csharp › lessons › parsing-json-arrays-and-nested-structures
Parsing JSON Arrays and Nested Structures
Welcome to this lesson on parsing arrays within JSON structures using C#. As you've learned in previous lessons, JSON (JavaScript Object Notation) is a popular data format used for exchanging data, owing to its simplicity and readability. JSON arrays are crucial when it comes to representing ...
🌐
SemanticDiff
semanticdiff.com › online-diff › json
SemanticDiff - Online JSON Diff
The tool compares JSON objects and arrays by first parsing them into a data structure that is independent of their textual representation.
🌐
JAXB
javaee.github.io › tutorial › jsonp001.html
Introduction to JSON
Objects are enclosed in braces ({}), their name-value pairs are separated by a comma (,), and the name and value in a pair are separated by a colon (:). Names in an object are strings, whereas values may be of any of the seven value types, including another object or an array.
🌐
RestfulAPI
restfulapi.net › home › json › json array
JSON Array - Multi-dimensional Array in JSON
November 4, 2023 - JSON Array is a list of items surrounded by square brackets. Each item in the array is separated by a comma. Learn about multi-dimensional arrays.
🌐
Leapcell
leapcell.io › blog › understanding-json-arrays-a-practical-guide
Understanding JSON Arrays: A Practical Guide | Leapcell
July 25, 2025 - JSON (JavaScript Object Notation) ... generate. One of its fundamental structures is the array, which is widely used to represent ordered collections of data....
🌐
JSON Editor Online
jsoneditoronline.org
JSON Editor Online: edit JSON, format JSON, query JSON
In code mode, you can paste a JSON file in the editor, and click the "Format" button from the menu. In tree mode, you can just paste the file and copy it again: the contents will automatically be formatted.
🌐
Jsongrid
jsongrid.com › json-grid
Json Grid Viewer Online - All-in-One Solution
Json Grid Viewer converts these array of object into friendly table format.