JSON stringify method converts a JavaScript object into a string (not an array).
JSON.stringify(value)
Example JSON stringify to array JavaScript
Simple HTML example code use the JavaScript function JSON.stringify() to convert it into a string. The output will be a string following the JSON notation.
<!DOCTYPE html>
<html>
<head>
<script>
var person={"first_name":"Tony","last_name":"Hawk","age":31};
console.log(person);
var res = JSON.stringify(person);
console.log(res);
console.log(typeof(res))
</script>
</head>
</html>
Output: Person is now a string, and ready to be sent to a server:
![JSON stringify to array JavaScript](https://i0.wp.com/tutorial.eyehunts.com/wp-content/uploads/2022/02/JSON-stringify-to-array-JavaScript.jpg?resize=526%2C167&ssl=1)
Do comment if you have any doubts or suggestions on this JS Array JSNO topic.
Note: The All JS Examples codes are tested on the Firefox browser and the Chrome browser.
OS: Windows 10
Code: HTML 5 Version