How to get the value of one of the key-value pairs of JSON in Javascrpt？ : I want to get the value of gid in Javascrpt


alert($.parseJSON(data); √
alert($.parseJSON(data['responseJSON'].gid)); ×
alert($.parseJSON(data['responseJSON']['gid'])); ×
I tried to use it like this but I got an error.
I found a lot of answers but still can't get the value I need.

{"form":{},"files":[{}],"filenames":["timg.jpg"],"filescount":1,"extra":{},"response":{"success":true,"msg":"image url after upload","gid":81},"reader":{},"jqXHR":{"readyState":4,"responseText":"{\"success\":true,\"msg\":\"image url after upload\",\"gid\":81}","responseJSON":{"success":true,"msg":"image url after upload","gid":81},"status":200,"statusText":"OK"}}


alert($.parseJSON(data));

I want to get the value of gid (81)，but it is not use.