Added a check to loop through the array to find the json content.