Back to main page

$on

Concept:

$on operation is used to define conditional propositions of form {"click":true}|{"user":4}. The example defined a proposition, that is defined only, when user is 4. Such variable can be used to e.g. examine user 4's personal preference.

Format:

    {
      "$on" : { "prop" : Proposition, "on" : Proposition } | 
              [ Proposition(prop), Proposition(on) ]
    }

See also:

Example 1:

    {"$on":{"prop":{"click":true}, "on":{"user.tags":"nyc"}}}

Example 2:

    {"$on":[{"click":true}, {"user.tags":"nyc"}]}