Skip to content

KAZOO Support Channels

This documentation is curated by 2600Hz as part of the KAZOO open source project. Join our community forums here for peer support. Only features in the docs.2600hz.com/supported space are included as part of our 2600Hz Support Services plan.

monster.util.dataFlags.get()#

Syntax#

monster.util.dataFlags.get(flagName, object);

Parameters#

Key Description Type Default Required
flagName Name of the flag we want to get the value of. String true
object Object in which the flag is set. Object true

Return value#

The value of the flag, so any JSON value is possible

Description#

This method looks into the flags and check if there's any matching the flagName provided. If yes it will return its value, if no, it will return undefined.

Examples#

Retrieve the value of a flag#

var user = {
    first_name: 'John',
    last_name: 'Doe',
    markers: {
        monster: {
            source: 'smartpbx'
        }
    }
}

monster.util.dataFlags.get('source', user); //  => returns 'smartpbx';