async function subscriptionsByEmail(email) {
  const trackDb = cloudant.use(dbName)

  const subscriptions = await trackDb.find({
    selector: {
      $and: [
        {
          subscribed: true
        },
        {
          email: email
        }
      ]
    }
  })

  return subscriptions
}
// List the subscriptions for a certain email address
List the subscriptions for a certain email address
List the subscriptions for a certain email address
async function subscriptionsByEmail(email) {
  const trackDb = cloudant.use(dbName)
  const subscriptions = await trackDb.find({
    selector: {
      $and: [
        {
          subscribed: true
        },
        {
          email: email
        }
      ]
    }
  })
  return subscriptions
}
async function subscriptionsByEmail ( email ) { const trackDb = cloudant . use ( dbName ) const subscriptions = await trackDb . find ( { selector : { $and : [ { subscribed : true } , { email : email } ] } } ) return subscriptions }
List the subscriptions for a certain email address
List the subscriptions for a certain email address