The standard way to use JavaScript is to use JSON.parse :
var myObject = JSON.parse( rawJSON );
If you are using jQuery with $.ajax (or an alternative) you can use dataType: 'json'
$.ajax({ type: 'GET', url: 'request.php', data: { variable: 'value' }, dataType: 'json', success: function(data) {
Although, if your server sent back the Content-Type: application/json header, jQuery would still return it like that.
Although another way to use jQuery is using $.parseJSON(rawJSON); You do not need to do this if you are using dataType.
var JSONArray = $.parseJSON(rawJSON);
source share