else {
for (Webproperty webproperty : webproperties.getItems()) {
String webpropertyId = webproperty.getId();
// Query profiles collection.
Profiles profiles = analytics.management().profiles().list(accountId, webpropertyId).execute();
if (profiles.getItems().isEmpty()) {
System.err.println("No profiles found");
}
else {
for (Profile profile : profiles.getItems()) {
jsonProfiles.add(new JSONObjectBuilder()
.add("id", profile.getId())
.add("name", profile.getName())
.build());
}