How to count occurrences of a specific value in a JSON array without using iterators?

Module Export - quick import into your scenario

You can copy and paste this module export into your scenario. This will import the modules (with fields/settings/filters) shown in my screenshots above.

  1. Move your mouse over the line of code below. Copy the JSON by clicking the copy button on the right of the code, which looks like this:

  2. Enter your scenario editor. Press ESC to close any dialogs. Press CTRLV (paste keyboard shortcut for Windows) to paste directly in the editor.

  3. Click on each imported module and re-save it for validation. There may be some errors prompting you to remap some variables and connections.

JSON module export — paste this directly in your scenario

{"subflows":[{"flow":[{"id":334,"module":"json:ParseJSON","version":1,"parameters":{"type":""},"mapper":{"json":"{\"resources\":[{\"productId\":\"12345\",\"destinationStatuses\":[{\"destination\":\"Shopping\",\"status\":\"pending\"},{\"destination\":\"SurfacesAcrossGoogle\",\"status\":\"approved\"}]},{\"productId\":\"67890\",\"destinationStatuses\":[{\"destination\":\"Shopping\",\"status\":\"pending\"},{\"destination\":\"SurfacesAcrossGoogle\",\"status\":\"pending\"}]}]}"},"metadata":{"designer":{"x":1116,"y":-772},"parameters":[{"name":"type","type":"udt","label":"Data structure"}]}},{"id":335,"module":"util:SetVariables","version":1,"parameters":{},"mapper":{"variables":[{"name":"pending","value":"{{length(map(flatten(map(334.resources; \"destinationStatuses\")); \"status\"; \"status\"; \"pending\"))}}"},{"name":"approved","value":"{{length(map(flatten(map(334.resources; \"destinationStatuses\")); \"status\"; \"status\"; \"approved\"))}}"},{"name":"disapproved","value":"{{length(map(flatten(map(334.resources; \"destinationStatuses\")); \"status\"; \"status\"; \"disapproved\"))}}"}],"scope":"roundtrip"},"metadata":{"designer":{"x":1416,"y":-772,"name":"Tally Statuses"}}}]}],"metadata":{"version":1}}

Note: Did you know you can reduce the size of blueprints and module export code like the above, using the Make Blueprint Scrubber?


A popular tool that I’m using is Dumpling AI.

DumplingAI also does so much, see:

In summary, Dumpling AI is able to replace several other paid services combined that cost more than itself, making it a noteworthy choice as the “multi-tool” of AI services.

Examples of How to use Dumpling AI

For more information, see these Dumpling AI tutorials below, grouped by category:

YouTube & Videos

Image Generation

AI Agents & RAGs

Searching & Scraping

Other Data Extraction

Business & Social

Dumpling AI Tutorials

How to Use

For more information on how to set this up, refer to these forum threads:

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

1 Like