extract Array from string in JavaScript

Many a times we receive data from API calls that are strings which hold Arrays/ objects. To extract these array/objects we use JSON.parse. There is a better now in ES6.

below is the code snippet