Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Pulling Multiple IDs From A Bundle, Into An Array

Avatar

Level 5

Hello

I need to pull two different types of IDs from the data below

I need the user.id from each NTAG as well as each team.id from each NTAG.

The goal is to have an array of IDs to include in a Update reply.

 

[
    {
        "body": {
            "data": [
                {
                    "ID": "68c0562903223440aff85176b936c54d",
                    "objCode": "NOTE",
                    "owner": {
                        "ID": "62a0af46002ec17cbee98efaa8105fda",
                        "name": "Fusion Integration",
                        "objCode": "USER"
                    },
                    "entryDate": "2025-09-09T16:30:33.128Z",
                    "isReply": false,
                    "tags": [
                        {
                            "ID": "68c056290322345e296bfb31382c3c1d",
                            "objCode": "NTAG",
                            "team": null,
                            "user": {
                                "ID": "redacted",
                                "name": "redacted",
                                "objCode": "USER"
                            }
                        },
                        {
                            "ID": "68c056290322345d95d488354dbf6c59",
                            "objCode": "NTAG",
                            "team": null,
                            "user": {
                                "ID": "redacted",
                                "name": "redacted",
                                "objCode": "USER"
                            }
                        },
                        {
                            "ID": "68c056290322345cc66e8cbbac7af1d1",
                            "objCode": "NTAG",
                            "team": null,
                            "user": {
                                "ID": "63c1a27e00279b070b1f1bea390bb479",
                                "name": "Test Worker",
                                "objCode": "USER"
                            }
                        },
                        {
                            "ID": "68c0562903223460b62c7882ad2c71ec",
                            "objCode": "NTAG",
                            "team": {
                                "ID": "6823962200097e8787dfcd4e08e2b0bc",
                                "name": "Test Team",
                                "objCode": "TEAMOB"
                            },
                            "user": null
                        },

 

Eric_D_Miller_0-1757612311885.png

 

 

 

Any assistance would be greatly appreciated.

4 Replies

Avatar

Level 2

I would use map() and merge() and remove().

First I will use map() to build 2 sets of arrays for each object type: users, and teams

Then use merge() to combine the two arrays.

Finally use remove() to get rid of any empty (null) values.

{{remove(merge(map(2.body.data; "user.ID"); map(2.body.data; "team.ID")); null)}}

This should give you an array of only the IDs of the individual object records. (The "2" is the module number. Replace it with the module you are referencing).

 

 

Avatar

Level 5

Hi Dan,

 

Thank you for the reply, unfortunately I am not getting any values from that.

Eric_D_Miller_0-1757940729942.png

Eric_D_Miller_1-1757940867427.png

 

 

Here is the input bundle if that helps:

[
    {
        "name": "Tags",
        "scope": "roundtrip",
        "value": []
    }
]

 

Avatar

Level 5

Pointing the '2.body.data' variable to '2.body.data[].tags' instead gives me values, but only from the first data array.

 

Eric_D_Miller_1-1757943928714.png

 

 

Highlighted yellow are the tags I am getting
and green is what tags I also need included

Eric_D_Miller_0-1757943813233.png

 

Any ideas?

 

Avatar

Community Advisor

If you map your notes array into an iterator, then you can pull your tags for each comment by referring your map command to the output of your iterator. If you want to pull them back into a single array, then put an aggregator in place.