json: Removed unnecessary if before loop