Objectlist Iterator

objectlist_iterator

Use the objectlist iterator when you want to handle an array of objects rather than an array of numeric or string values. A good example is for data from Salience Entities:

{
    "salience": {
        "entities": [
            {
                "type": "Person",
                "name": "Larry Ellison"
            },
            {
                "type": "Product",
                "name": "Database"
            }
        ]
    }
}

We can use this .INI block:

[ENTITIES :iter = objectlist_iterator(salience.entities)]
ID = interaction.id
TYPE = :iter.type
NAME = :iter.name

to write a table such as this:

ID TYPE NAME
12345 Person Larry Ellison
12345 Product Database