Use a complex array as filter in map function

Hello eveyrone,

I’m using from a long time but this is the first time I’m facing this issue. I need to use a key filter in a map but the data are in collection.

As you can see, my goal is to get the items where the filter is “b”.

At the moment, I get an “empty” :slight_smile: Even if you can see I have a “b” in at least one line of my array

Could you help me solving this ?

1 Like

Can you send a screenshot of your modules and show the output bundles of the one before the iterator, otherwise it might be impossible to suggest an optimization or a better solution

Thanks for sharing!

To help identify what’s going wrong, could you please confirm that there are no extra spaces or hidden characters in the key you’re using inside the map filter?

Also, it would be really helpful if you could share the input and output JSON from the module. That way, we can take a closer look at the data structure and better understand why the filter isn’t returning the expected results.

Best regards,
Digipanda Consulting Pvt. Ltd
@digiPanda_Automation

Hey! Thanks for sharing, but it looks like the JSON you provided might be incomplete or missing some fields. Could you please double-check and share the full JSON again?

It would be great if you could provide the exact same structure you’re using in your scenario—this will help us understand the issue more accurately and guide you with the right solution.

Best regards,
Digipanda Consulting Pvt. Ltd
@digiPanda_Automation

there you are

[
    {
        "array": [
            {
                "id": "2046012269",
                "name": "Relevé géomètre",
                "board": {
                    "id": "2046012239"
                },
                "email": "****-squad_pulse_2046012269_908ce9fb86bdb2132a5d__78215003@euc1.mx.monday.com",
                "event": {
                    "app": "monday",
                    "type": "update_column_value",
                    "triggerTime": "2025-07-11T06:46:31.426Z",
                    "subscriptionId": 68607759,
                    "isRetry": false,
                    "userId": 78215003,
                    "originalTriggerUuid": null,
                    "boardId": 2046012239,
                    "groupId": "topics",
                    "pulseId": 2046012269,
                    "pulseName": "Relevé géomètre",
                    "columnId": "color_mksqyea5",
                    "columnType": "color",
                    "columnTitle": "Label",
                    "value": {
                        "label": {
                            "index": 0,
                            "text": "Comptabilisé M-1",
                            "style": {
                                "color": "#9aadbd",
                                "border": "#9aadbd",
                                "var_name": "winter"
                            },
                            "is_done": false
                        },
                        "post_id": null
                    },
                    "previousValue": {
                        "label": {
                            "index": 2,
                            "text": "Reste à faire",
                            "style": {
                                "color": "#9d99b9",
                                "border": "#9d99b9",
                                "var_name": "purple_gray"
                            },
                            "is_done": false
                        },
                        "post_id": null
                    },
                    "changedAt": 1752216390.842733,
                    "isTopGroup": true,
                    "triggerUuid": "74d0d1c18d3f4d73cea86c8094a880be"
                },
                "group": {
                    "id": "topics",
                    "title": "M-1",
                    "deleted": false,
                    "archived": false
                },
                "state": "active",
                "assets": [],
                "subitems": [],
                "undefined": null,
                "created_at": "2025-07-10T14:21:41Z",
                "creator_id": "78215003",
                "updated_at": "2025-07-11T06:46:30Z",
                "parent_item": null,
                "__IMTINDEX__": 1,
                "__IMTLENGTH__": 1,
                "column_values": [
                    {
                        "id": "board_relation_mksqfr76",
                        "value": "{\"changed_at\":\"2025-07-10T14:36:48.563Z\",\"linkedPulseIds\":[{\"linkedPulseId\":2045946582}]}",
                        "text": "GEOFIT",
                        "title": "👷 Prestataire"
                    },
                    {
                        "id": "numeric_mksqz935",
                        "value": "\"4400\"",
                        "text": "4400",
                        "title": "Montant",
                        "additional_info": "{\"symbol\":\"€\",\"custom_unit\":\"\",\"direction\":\"right\"}"
                    },
                    {
                        "id": "color_mksqyea5",
                        "value": "{\"index\":0,\"post_id\":null,\"changed_at\":\"2025-07-11T06:46:30.126Z\"}",
                        "text": "Comptabilisé M-1",
                        "title": "Label",
                        "additional_info": "{\"label\":\"Comptabilisé M-1\",\"color\":\"#9aadbd\",\"changed_at\":\"2025-07-11T06:46:30.126Z\"}"
                    },
                    {
                        "id": "text_mksqkskm",
                        "value": "\"b\"",
                        "text": "b",
                        "title": "test"
                    },
                    {
                        "id": "formula_mksq4q2d",
                        "value": null,
                        "text": "",
                        "title": "Formule"
                    }
                ],
                "mappable_column_values": {
                    "board_relation_mksqfr76": {
                        "changed_at": "2025-07-10T14:36:48.563Z",
                        "linkedPulseIds": [
                            {
                                "linkedPulseId": 2045946582
                            }
                        ],
                        "text": "GEOFIT"
                    },
                    "numeric_mksqz935": "4400",
                    "color_mksqyea5": {
                        "index": 0,
                        "post_id": null,
                        "changed_at": "2025-07-11T06:46:30.126Z",
                        "additonal_info": {
                            "label": "Comptabilisé M-1",
                            "color": "#9aadbd",
                            "changed_at": "2025-07-11T06:46:30.126Z"
                        },
                        "text": "Comptabilisé M-1"
                    },
                    "text_mksqkskm": "b",
                    "formula_mksq4q2d": null
                }
            },
            {
                "id": "2046012269",
                "name": "Relevé géomètre",
                "board": {
                    "id": "2046012239"
                },
                "email": "****-squad_pulse_2046012269_908ce9fb86bdb2132a5d__78215003@euc1.mx.monday.com",
                "event": {
                    "app": "monday",
                    "type": "update_column_value",
                    "triggerTime": "2025-07-11T06:46:31.426Z",
                    "subscriptionId": 68607759,
                    "isRetry": false,
                    "userId": 78215003,
                    "originalTriggerUuid": null,
                    "boardId": 2046012239,
                    "groupId": "topics",
                    "pulseId": 2046012269,
                    "pulseName": "Relevé géomètre",
                    "columnId": "color_mksqyea5",
                    "columnType": "color",
                    "columnTitle": "Label",
                    "value": {
                        "label": {
                            "index": 0,
                            "text": "Comptabilisé M-1",
                            "style": {
                                "color": "#9aadbd",
                                "border": "#9aadbd",
                                "var_name": "winter"
                            },
                            "is_done": false
                        },
                        "post_id": null
                    },
                    "previousValue": {
                        "label": {
                            "index": 2,
                            "text": "Reste à faire",
                            "style": {
                                "color": "#9d99b9",
                                "border": "#9d99b9",
                                "var_name": "purple_gray"
                            },
                            "is_done": false
                        },
                        "post_id": null
                    },
                    "changedAt": 1752216390.842733,
                    "isTopGroup": true,
                    "triggerUuid": "74d0d1c18d3f4d73cea86c8094a880be"
                },
                "group": {
                    "id": "topics",
                    "title": "M-1",
                    "deleted": false,
                    "archived": false
                },
                "state": "active",
                "assets": [],
                "subitems": [],
                "undefined": null,
                "created_at": "2025-07-10T14:21:41Z",
                "creator_id": "78215003",
                "updated_at": "2025-07-11T06:46:30Z",
                "parent_item": null,
                "__IMTINDEX__": 1,
                "__IMTLENGTH__": 1,
                "column_values": [
                    {
                        "id": "board_relation_mksqfr76",
                        "value": "{\"changed_at\":\"2025-07-10T14:36:48.563Z\",\"linkedPulseIds\":[{\"linkedPulseId\":2045946582}]}",
                        "text": "GEOFIT",
                        "title": "👷 Prestataire"
                    },
                    {
                        "id": "numeric_mksqz935",
                        "value": "\"4400\"",
                        "text": "4400",
                        "title": "Montant",
                        "additional_info": "{\"symbol\":\"€\",\"custom_unit\":\"\",\"direction\":\"right\"}"
                    },
                    {
                        "id": "color_mksqyea5",
                        "value": "{\"index\":0,\"post_id\":null,\"changed_at\":\"2025-07-11T06:46:30.126Z\"}",
                        "text": "Comptabilisé M-1",
                        "title": "Label",
                        "additional_info": "{\"label\":\"Comptabilisé M-1\",\"color\":\"#9aadbd\",\"changed_at\":\"2025-07-11T06:46:30.126Z\"}"
                    },
                    {
                        "id": "text_mksqkskm",
                        "value": "\"b\"",
                        "text": "b",
                        "title": "test"
                    },
                    {
                        "id": "formula_mksq4q2d",
                        "value": null,
                        "text": "",
                        "title": "Formule"
                    }
                ],
                "mappable_column_values": {
                    "board_relation_mksqfr76": {
                        "changed_at": "2025-07-10T14:36:48.563Z",
                        "linkedPulseIds": [
                            {
                                "linkedPulseId": 2045946582
                            }
                        ],
                        "text": "GEOFIT"
                    },
                    "numeric_mksqz935": "4400",
                    "color_mksqyea5": {
                        "index": 0,
                        "post_id": null,
                        "changed_at": "2025-07-11T06:46:30.126Z",
                        "additonal_info": {
                            "label": "Comptabilisé M-1",
                            "color": "#9aadbd",
                            "changed_at": "2025-07-11T06:46:30.126Z"
                        },
                        "text": "Comptabilisé M-1"
                    },
                    "text_mksqkskm": "b",
                    "formula_mksq4q2d": null
                }
            },
            {
                "id": "2046012269",
                "name": "Relevé géomètre",
                "board": {
                    "id": "2046012239"
                },
                "email": "****-squad_pulse_2046012269_908ce9fb86bdb2132a5d__78215003@euc1.mx.monday.com",
                "event": {
                    "app": "monday",
                    "type": "update_column_value",
                    "triggerTime": "2025-07-11T06:46:31.426Z",
                    "subscriptionId": 68607759,
                    "isRetry": false,
                    "userId": 78215003,
                    "originalTriggerUuid": null,
                    "boardId": 2046012239,
                    "groupId": "topics",
                    "pulseId": 2046012269,
                    "pulseName": "Relevé géomètre",
                    "columnId": "color_mksqyea5",
                    "columnType": "color",
                    "columnTitle": "Label",
                    "value": {
                        "label": {
                            "index": 0,
                            "text": "Comptabilisé M-1",
                            "style": {
                                "color": "#9aadbd",
                                "border": "#9aadbd",
                                "var_name": "winter"
                            },
                            "is_done": false
                        },
                        "post_id": null
                    },
                    "previousValue": {
                        "label": {
                            "index": 2,
                            "text": "Reste à faire",
                            "style": {
                                "color": "#9d99b9",
                                "border": "#9d99b9",
                                "var_name": "purple_gray"
                            },
                            "is_done": false
                        },
                        "post_id": null
                    },
                    "changedAt": 1752216390.842733,
                    "isTopGroup": true,
                    "triggerUuid": "74d0d1c18d3f4d73cea86c8094a880be"
                },
                "group": {
                    "id": "topics",
                    "title": "M-1",
                    "deleted": false,
                    "archived": false
                },
                "state": "active",
                "assets": [],
                "subitems": [],
                "undefined": null,
                "created_at": "2025-07-10T14:21:41Z",
                "creator_id": "78215003",
                "updated_at": "2025-07-11T06:46:30Z",
                "parent_item": null,
                "__IMTINDEX__": 1,
                "__IMTLENGTH__": 1,
                "column_values": [
                    {
                        "id": "board_relation_mksqfr76",
                        "value": "{\"changed_at\":\"2025-07-10T14:36:48.563Z\",\"linkedPulseIds\":[{\"linkedPulseId\":2045946582}]}",
                        "text": "GEOFIT",
                        "title": "👷 Prestataire"
                    },
                    {
                        "id": "numeric_mksqz935",
                        "value": "\"4400\"",
                        "text": "4400",
                        "title": "Montant",
                        "additional_info": "{\"symbol\":\"€\",\"custom_unit\":\"\",\"direction\":\"right\"}"
                    },
                    {
                        "id": "color_mksqyea5",
                        "value": "{\"index\":0,\"post_id\":null,\"changed_at\":\"2025-07-11T06:46:30.126Z\"}",
                        "text": "Comptabilisé M-1",
                        "title": "Label",
                        "additional_info": "{\"label\":\"Comptabilisé M-1\",\"color\":\"#9aadbd\",\"changed_at\":\"2025-07-11T06:46:30.126Z\"}"
                    },
                    {
                        "id": "text_mksqkskm",
                        "value": "\"b\"",
                        "text": "b",
                        "title": "test"
                    },
                    {
                        "id": "formula_mksq4q2d",
                        "value": null,
                        "text": "",
                        "title": "Formule"
                    }
                ],
                "mappable_column_values": {
                    "board_relation_mksqfr76": {
                        "changed_at": "2025-07-10T14:36:48.563Z",
                        "linkedPulseIds": [
                            {
                                "linkedPulseId": 2045946582
                            }
                        ],
                        "text": "GEOFIT"
                    },
                    "numeric_mksqz935": "4400",
                    "color_mksqyea5": {
                        "index": 0,
                        "post_id": null,
                        "changed_at": "2025-07-11T06:46:30.126Z",
                        "additonal_info": {
                            "label": "Comptabilisé M-1",
                            "color": "#9aadbd",
                            "changed_at": "2025-07-11T06:46:30.126Z"
                        },
                        "text": "Comptabilisé M-1"
                    },
                    "text_mksqkskm": "b",
                    "formula_mksq4q2d": null
                }
            },
            {
                "id": "2046012269",
                "name": "Relevé géomètre",
                "board": {
                    "id": "2046012239"
                },
                "email": "****-squad_pulse_2046012269_908ce9fb86bdb2132a5d__78215003@euc1.mx.monday.com",
                "event": {
                    "app": "monday",
                    "type": "update_column_value",
                    "triggerTime": "2025-07-11T06:46:31.426Z",
                    "subscriptionId": 68607759,
                    "isRetry": false,
                    "userId": 78215003,
                    "originalTriggerUuid": null,
                    "boardId": 2046012239,
                    "groupId": "topics",
                    "pulseId": 2046012269,
                    "pulseName": "Relevé géomètre",
                    "columnId": "color_mksqyea5",
                    "columnType": "color",
                    "columnTitle": "Label",
                    "value": {
                        "label": {
                            "index": 0,
                            "text": "Comptabilisé M-1",
                            "style": {
                                "color": "#9aadbd",
                                "border": "#9aadbd",
                                "var_name": "winter"
                            },
                            "is_done": false
                        },
                        "post_id": null
                    },
                    "previousValue": {
                        "label": {
                            "index": 2,
                            "text": "Reste à faire",
                            "style": {
                                "color": "#9d99b9",
                                "border": "#9d99b9",
                                "var_name": "purple_gray"
                            },
                            "is_done": false
                        },
                        "post_id": null
                    },
                    "changedAt": 1752216390.842733,
                    "isTopGroup": true,
                    "triggerUuid": "74d0d1c18d3f4d73cea86c8094a880be"
                },
                "group": {
                    "id": "topics",
                    "title": "M-1",
                    "deleted": false,
                    "archived": false
                },
                "state": "active",
                "assets": [],
                "subitems": [],
                "undefined": null,
                "created_at": "2025-07-10T14:21:41Z",
                "creator_id": "78215003",
                "updated_at": "2025-07-11T06:46:30Z",
                "parent_item": null,
                "__IMTINDEX__": 1,
                "__IMTLENGTH__": 1,
                "column_values": [
                    {
                        "id": "board_relation_mksqfr76",
                        "value": "{\"changed_at\":\"2025-07-10T14:36:48.563Z\",\"linkedPulseIds\":[{\"linkedPulseId\":2045946582}]}",
                        "text": "GEOFIT",
                        "title": "👷 Prestataire"
                    },
                    {
                        "id": "numeric_mksqz935",
                        "value": "\"4400\"",
                        "text": "4400",
                        "title": "Montant",
                        "additional_info": "{\"symbol\":\"€\",\"custom_unit\":\"\",\"direction\":\"right\"}"
                    },
                    {
                        "id": "color_mksqyea5",
                        "value": "{\"index\":0,\"post_id\":null,\"changed_at\":\"2025-07-11T06:46:30.126Z\"}",
                        "text": "Comptabilisé M-1",
                        "title": "Label",
                        "additional_info": "{\"label\":\"Comptabilisé M-1\",\"color\":\"#9aadbd\",\"changed_at\":\"2025-07-11T06:46:30.126Z\"}"
                    },
                    {
                        "id": "text_mksqkskm",
                        "value": "\"b\"",
                        "text": "b",
                        "title": "test"
                    },
                    {
                        "id": "formula_mksq4q2d",
                        "value": null,
                        "text": "",
                        "title": "Formule"
                    }
                ],
                "mappable_column_values": {
                    "board_relation_mksqfr76": {
                        "changed_at": "2025-07-10T14:36:48.563Z",
                        "linkedPulseIds": [
                            {
                                "linkedPulseId": 2045946582
                            }
                        ],
                        "text": "GEOFIT"
                    },
                    "numeric_mksqz935": "4400",
                    "color_mksqyea5": {
                        "index": 0,
                        "post_id": null,
                        "changed_at": "2025-07-11T06:46:30.126Z",
                        "additonal_info": {
                            "label": "Comptabilisé M-1",
                            "color": "#9aadbd",
                            "changed_at": "2025-07-11T06:46:30.126Z"
                        },
                        "text": "Comptabilisé M-1"
                    },
                    "text_mksqkskm": "b",
                    "formula_mksq4q2d": null
                }
            },
            {
                "id": "2046012269",
                "name": "Relevé géomètre",
                "board": {
                    "id": "2046012239"
                },
                "email": "****-squad_pulse_2046012269_908ce9fb86bdb2132a5d__78215003@euc1.mx.monday.com",
                "event": {
                    "app": "monday",
                    "type": "update_column_value",
                    "triggerTime": "2025-07-11T06:46:31.426Z",
                    "subscriptionId": 68607759,
                    "isRetry": false,
                    "userId": 78215003,
                    "originalTriggerUuid": null,
                    "boardId": 2046012239,
                    "groupId": "topics",
                    "pulseId": 2046012269,
                    "pulseName": "Relevé géomètre",
                    "columnId": "color_mksqyea5",
                    "columnType": "color",
                    "columnTitle": "Label",
                    "value": {
                        "label": {
                            "index": 0,
                            "text": "Comptabilisé M-1",
                            "style": {
                                "color": "#9aadbd",
                                "border": "#9aadbd",
                                "var_name": "winter"
                            },
                            "is_done": false
                        },
                        "post_id": null
                    },
                    "previousValue": {
                        "label": {
                            "index": 2,
                            "text": "Reste à faire",
                            "style": {
                                "color": "#9d99b9",
                                "border": "#9d99b9",
                                "var_name": "purple_gray"
                            },
                            "is_done": false
                        },
                        "post_id": null
                    },
                    "changedAt": 1752216390.842733,
                    "isTopGroup": true,
                    "triggerUuid": "74d0d1c18d3f4d73cea86c8094a880be"
                },
                "group": {
                    "id": "topics",
                    "title": "M-1",
                    "deleted": false,
                    "archived": false
                },
                "state": "active",
                "assets": [],
                "subitems": [],
                "undefined": null,
                "created_at": "2025-07-10T14:21:41Z",
                "creator_id": "78215003",
                "updated_at": "2025-07-11T06:46:30Z",
                "parent_item": null,
                "__IMTINDEX__": 1,
                "__IMTLENGTH__": 1,
                "column_values": [
                    {
                        "id": "board_relation_mksqfr76",
                        "value": "{\"changed_at\":\"2025-07-10T14:36:48.563Z\",\"linkedPulseIds\":[{\"linkedPulseId\":2045946582}]}",
                        "text": "GEOFIT",
                        "title": "👷 Prestataire"
                    },
                    {
                        "id": "numeric_mksqz935",
                        "value": "\"4400\"",
                        "text": "4400",
                        "title": "Montant",
                        "additional_info": "{\"symbol\":\"€\",\"custom_unit\":\"\",\"direction\":\"right\"}"
                    },
                    {
                        "id": "color_mksqyea5",
                        "value": "{\"index\":0,\"post_id\":null,\"changed_at\":\"2025-07-11T06:46:30.126Z\"}",
                        "text": "Comptabilisé M-1",
                        "title": "Label",
                        "additional_info": "{\"label\":\"Comptabilisé M-1\",\"color\":\"#9aadbd\",\"changed_at\":\"2025-07-11T06:46:30.126Z\"}"
                    },
                    {
                        "id": "text_mksqkskm",
                        "value": "\"b\"",
                        "text": "b",
                        "title": "test"
                    },
                    {
                        "id": "formula_mksq4q2d",
                        "value": null,
                        "text": "",
                        "title": "Formule"
                    }
                ],
                "mappable_column_values": {
                    "board_relation_mksqfr76": {
                        "changed_at": "2025-07-10T14:36:48.563Z",
                        "linkedPulseIds": [
                            {
                                "linkedPulseId": 2045946582
                            }
                        ],
                        "text": "GEOFIT"
                    },
                    "numeric_mksqz935": "4400",
                    "color_mksqyea5": {
                        "index": 0,
                        "post_id": null,
                        "changed_at": "2025-07-11T06:46:30.126Z",
                        "additonal_info": {
                            "label": "Comptabilisé M-1",
                            "color": "#9aadbd",
                            "changed_at": "2025-07-11T06:46:30.126Z"
                        },
                        "text": "Comptabilisé M-1"
                    },
                    "text_mksqkskm": "b",
                    "formula_mksq4q2d": null
                }
            }
        ],
        "__IMTAGGLENGTH__": 5
    }
]

@panda hello ! Is it understandable Now ? I will be grateful to have your help

Maybe you what the blueprint ?

SOLVED: Summing Monday values with conditions and handling empty values

Hi everyone,

I managed to solve my issue and wanted to share the solution for others who might face similar challenges.

Problem:
In module 4, I’m retrieving a JSON from Monday (as shared in a previous post). I needed to sum values from the numeric_mksqz935 variable, but only when the text in color_mksqyea5 matches specific grouping values. The challenge was that sometimes the numeric values are empty/null, which causes issues with the join function.

Solution - Step by Step Method:

  1. Aggregate Monday data

    • Start with the JSON data from Monday
  2. Filter and extract relevant values using map()

    • Use this formula to get items that match my criteria and assemble them for the Monday API:
    {{join(map(14.array; "id"; "mappable_column_values.color_mksqyea5.text"; "Reste à faire"); ",")}}
    
  3. Execute the API query

    • Send the filtered IDs to Monday API
  4. Extract numeric values from API response

    • Use this formula to get the numeric values:
    {{join(map(30.body.data.items; "column_values[].text"); "+")}}
    
    • Issue: This returns strings like 1000++++10+25+50 because some items have the correct grouping value but empty numeric fields
  5. Clean the data using Text Parser

    • Use Text Parser with Global Match enabled
    • Pattern: (\d+(?:\.\d+)?)
    • This extracts only the numeric values, ignoring the multiple + signs
  6. Sum the values using Numeric Aggregator

    • Apply Numeric Aggregator to the cleaned numeric values from step 5

Key Points:

  • The empty numeric values in Monday create multiple consecutive + signs in the join
  • Text Parser with Global Match is perfect for extracting only numbers from messy strings
  • This method handles both integer and decimal values

Note: Make doesn’t allow me to post more than 3 images in this post, I’ll try to complete with additional screenshots in the next post.

Hope this helps others dealing with similar Monday data processing challenges!

2 Likes