In order to convert an object into an array, this is easy using the Object.values() method. On the other hand if you want to convert an object into a string, any Object can be converted to a string using the JSON.stringify() method.
IN javascript you can convert js data such as array into JSON using JSON.stringfy() , and back from JSON to js array using JSON.Parse, Here is the syntax :