Created parseJSON function for getting new JSON structure