How to aggegrate a bundle and convert to a text string

I am looking for a way to convert a bundle and aggregate it to a text string.

Here is the output:

and essentially, I just want to combine all of the “text” for the “primary_content” and “secondary_content” into a string so I can then feed it into ChatGTP to create a summary. I feel like I am missing something very simple. I have tried a text aggegrator, iterator, and a few other options with no luck.

I am using a Text Aggregator, but it won’t let me add an array.

You need to transform the array into a text string by using the join() function or if you want to etract a specific part of the array you’ll need to use the map() function.

Hope this helps!

Thank you! I added the join() to the text aggregator but now I am getting an empty text


I also tried it without the iterator:

image

But I still receive an empty ouptut

Since the data that you want is buried deep within a array you’re going to need to use the map() function to drill into the values you need. Review this help article and it will teach you the basics of what you need to know to do this.
https://www.make.com/en/help/mapping/mapping-arrays

Thank you!

So I was able to use the iterator:

image

And I used the Array Aggregator to bring them all into one bundle:

From here, I added the Set Multiple Variables to get all the text outputs into a string

image

My Variable output is all blank. So I think I am doing some wrong here and can’t figure it out. My goal is to just combine all of the “text” into a single text string.

try map(83. Array;primary_content.text)


Alex Sirota

:heart_on_fire: Check out Make for Make Newbies Video Series :heart_on_fire:

My Solutions on Make Community

Thanks Alex. I tried this and the input and output were empty. I just need to combine all the text under each of the primary_content into a single string.

Here is an example output bundle from the Array Aggregator.

[
    {
        "array": [
            {
                "h_title": "Search for clinical information on drugs and medical devices",
                "main_title": "Search for clinical information on drugs and medical devices",
                "primary_content": [
                    {
                        "text": "Content and search results on this site are in the language provided by the manufacturer. Access and use of clinical information is governed by the Terms of Use.",
                        "url": "https://clinical-information.canada.ca/ci-rc/terms",
                        "urls": [
                            {
                                "url": "https://clinical-information.canada.ca/ci-rc/terms",
                                "anchor_text": "Terms of Use"
                            }
                        ]
                    }
                ]
            },
            {
                "h_title": "Don't see what you're looking for?",
                "main_title": "Search for clinical information on drugs and medical devices",
                "primary_content": [
                    {
                        "text": "Still don’t see what you’re looking for? You can request clinical information for a drug or a medical device.",
                        "url": "https://clinical-information.canada.ca/request-drug-clinical-information",
                        "urls": [
                            {
                                "url": "https://clinical-information.canada.ca/request-drug-clinical-information",
                                "anchor_text": "drug"
                            },
                            {
                                "url": "https://clinical-information.canada.ca/request-device-clinical-information",
                                "anchor_text": "medical device"
                            }
                        ]
                    }
                ]
            },
            {
                "h_title": "Drug records",
                "main_title": "Search for clinical information on drugs and medical devices",
                "primary_content": [
                    {
                        "text": "MEASLES VIRUS VACCINE LIVE ATTENUATED",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "MUMPS VIRUS VACCINE LIVE ATTENUATED",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RUBELLA VIRUS VACCINE LIVE ATTENUATED",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "ANTIHEMOPHILIC FACTOR VIII (RECOMBINANT, B-DOMAIN TRUNCATED), PEGYLATED",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 6 L1 PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 11 L1 PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 16 L1 PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 18 L1 PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 31 L1 PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 33 L1 PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 45 L1 PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 52 L1 PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 58 L1 PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "DIPHTHERIA TOXOID 25 LF / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "FILAMENTOUS HAEMAGGLUTININ 25 MCG / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "HAEMOPHILUS INFLUENZAE TYPE B-PRP 10 MCG / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "HEPATITIS B SURFACE ANTIGEN (RECOMBINANT) 10 MCG / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "INACTIVATED POLIOVIRUS TYPE I 40 UNIT / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "INACTIVATED POLIOVIRUS TYPE II 8 UNIT / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "INACTIVATED POLIOVIRUS TYPE III 32 UNIT / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PERTUSSIS TOXOID 25 MCG / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "TETANUS TOXOID 10 LF / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "TETANUS TOXOID ADSORBED 40 MCG / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "MEASLES VIRUS VACCINE LIVE ATTENUATED 1000 UNIT / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "MUMPS VIRUS VACCINE LIVE ATTENUATED (JERYL LYNN STRAIN) 10000 UNIT / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RUBELLA VIRUS VACCINE LIVE ATTENUATED (WISTAR RA27/3 STRAIN) 1000 UNIT / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "INACTIVATED POLIOMYELITIS VACCINE (V.C.O.) TYPE 1 MAHONEY",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "INACTIVATED POLIOMYELITIS VACCINE (D.C.O.) TYPE 2 MEF1",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "INACTIVATED POLIOMYELITIS VACCINE (V.C.O.) TYPE 3 SAUKETT",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RECOMBINANT HAEMAGGLUTININ PROTEIN-STRAIN A(H1N1)",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RECOMBINANT HAEMAGGLUTININ PROTEIN-STRAIN A(H3N2)",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RECOMBINANT HAEMAGGLUTININ PROTEIN-STRAIN B (VICTORIA)",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "CORYNEBACTERIUM DIPHTHERIAE CRM-197 PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "ALFA 1-PROTEINASE INHIBITOR (HUMAN)",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "VIRUS-LIKE PARTICLES (VLP) OF SARS-COV-2 SPIKE PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "SARS-COV-2 RECOMBINANT SPIKE PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "BACILLUS CALMETTE-GUÉRIN (BCG) - STRAIN RUSSIAN BCG-I",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 1, 3, 4, 5, 6A, 6B, 7F, 8, 9V, 10A, 11A, 12F, 14, 15B, 18C, 19A, 19F, 22F, 23F, and 33F",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "LUTETIUM (177LU) VIPIVOTIDE TETRAXETAN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "FIMBRIAE TYPES 2 AND 3 (FIM)",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "INACTIVATED POLIOMYELITIS VACCINE (D.C.O) TYPE 1 MAHONEY",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "INACTIVATED POLIOMYELITIS VACCINE (D.C.O.) TYPE 2 M.E.F.1",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "INACTIVATED POLIOMYELITIS VACCINE (D.C.O.) TYPE 3 SAUKETT",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "HEPATITIS B SURFACE ANTIGEN (RECOMBINANT)",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "ANTIHEMOPHILIC FACTOR (RECOMBINANT BDD), FC FUSION PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "COAGULATION FACTOR IX (RECOMBINANT), PEGYLATED",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 1, 3,4, 5, 6A, 6B, 7F, 9V, 14, 18C, 19A, 22F, 23F, 33F",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "INACTIVATED POLIOMYELITIS VACCINE (V.C.O.) TYPE 2 MEF1",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "HAEMOPHILUS INFLUENZAE TYPE B-PRP",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "NEISSERIA MENINGITIDIS GRP B RECOMBINANT LIPOPROTEIN 2086 SUBFAMILY A",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "NEISSERIA MENINGITIDIS GRP B RECOMBINANT LIPOPROTEIN 2086 SUBFAMILY B",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "COAGULATION FACTOR IX (HUMAN)",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 6A",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 6B",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 7F",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 9V",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 18C",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 19A",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 19F",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 22F",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 23F",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 33F",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "EBOLA ZAIRE VACCINE (RVSV [DELTA] G-ZEBOV-GP, LIVE)",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "MENINGOCOCCAL POLYSACCHARIDE ANTIGEN GROUP A",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "MENINGOCOCCAL POLYSACCHARIDE ANTIGEN GROUP C",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "MENINGOCOCCAL POLYSACCHARIDE ANTIGEN GROUP W-135",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "MENINGOCOCCAL POLYSACCHARIDE ANTIGEN GROUP Y",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 1, 3*, 4*, 5* ,6A* ,6B*, 7F*, 8* ,9V* ,10A* ,11A* ,12F* ,14*, 15B* ,18C* ,19A* ,19F*, 22F* ,23F* ,33F",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 10A",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 11A",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 12F",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 15B",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RSV SUBGROUP A STABILIZED PREFUSION F PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RSV SUBGROUP B STABILIZED PREFUSION F PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "COAGULATION FACTOR IX (RECOMBINANT), ALBUMIN FUSION PROTEIN (RIX-FP)",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "VIBRIO CHOLERAE, STRAIN CVD 103-HGR, LIVE",
                        "url": null,
                        "urls": null
                    }
                ]
            },
            {
                "h_title": "Don't see what you're looking for?",
                "main_title": "Search for clinical information on drugs and medical devices",
                "primary_content": [
                    {
                        "text": "Still don’t see what you’re looking for? You can request clinical information for a drug or a medical device.",
                        "url": "https://clinical-information.canada.ca/request-drug-clinical-information",
                        "urls": [
                            {
                                "url": "https://clinical-information.canada.ca/request-drug-clinical-information",
                                "anchor_text": "drug"
                            },
                            {
                                "url": "https://clinical-information.canada.ca/request-device-clinical-information",
                                "anchor_text": "medical device"
                            }
                        ]
                    }
                ]
            },
            {
                "h_title": "Thank you for your help!",
                "main_title": "Search for clinical information on drugs and medical devices",
                "primary_content": [
                    {
                        "text": "You will not receive a reply. For enquiries, contact us.",
                        "url": "https://www.canada.ca/en/contact/index.html",
                        "urls": [
                            {
                                "url": "https://www.canada.ca/en/contact/index.html",
                                "anchor_text": "contact us"
                            }
                        ]
                    }
                ]
            }
        ],
        "__IMTAGGLENGTH__": 5
    }
]

Can you reformat without the curly quotes and as code formatting?

Thanks Alex! I just edited the previous post to include the </> formatting and removed all curly brackets. Is that what you were looking for?

1 Like

For some reason the JSON is not proper anymore. Can you just grab the output bundle from the array aggregator and copy and paste that here with code formatting?

Ok try this:

[
    {
        "array": [
            {
                "h_title": "Search for clinical information on drugs and medical devices",
                "main_title": "Search for clinical information on drugs and medical devices",
                "primary_content": [
                    {
                        "text": "Content and search results on this site are in the language provided by the manufacturer. Access and use of clinical information is governed by the Terms of Use.",
                        "url": "https://clinical-information.canada.ca/ci-rc/terms",
                        "urls": [
                            {
                                "url": "https://clinical-information.canada.ca/ci-rc/terms",
                                "anchor_text": "Terms of Use"
                            }
                        ]
                    }
                ]
            },
            {
                "h_title": "Don't see what you're looking for?",
                "main_title": "Search for clinical information on drugs and medical devices",
                "primary_content": [
                    {
                        "text": "Still don’t see what you’re looking for? You can request clinical information for a drug or a medical device.",
                        "url": "https://clinical-information.canada.ca/request-drug-clinical-information",
                        "urls": [
                            {
                                "url": "https://clinical-information.canada.ca/request-drug-clinical-information",
                                "anchor_text": "drug"
                            },
                            {
                                "url": "https://clinical-information.canada.ca/request-device-clinical-information",
                                "anchor_text": "medical device"
                            }
                        ]
                    }
                ]
            },
            {
                "h_title": "Drug records",
                "main_title": "Search for clinical information on drugs and medical devices",
                "primary_content": [
                    {
                        "text": "MEASLES VIRUS VACCINE LIVE ATTENUATED",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "MUMPS VIRUS VACCINE LIVE ATTENUATED",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RUBELLA VIRUS VACCINE LIVE ATTENUATED",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "ANTIHEMOPHILIC FACTOR VIII (RECOMBINANT, B-DOMAIN TRUNCATED), PEGYLATED",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 6 L1 PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 11 L1 PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 16 L1 PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 18 L1 PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 31 L1 PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 33 L1 PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 45 L1 PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 52 L1 PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 58 L1 PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "DIPHTHERIA TOXOID 25 LF / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "FILAMENTOUS HAEMAGGLUTININ 25 MCG / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "HAEMOPHILUS INFLUENZAE TYPE B-PRP 10 MCG / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "HEPATITIS B SURFACE ANTIGEN (RECOMBINANT) 10 MCG / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "INACTIVATED POLIOVIRUS TYPE I 40 UNIT / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "INACTIVATED POLIOVIRUS TYPE II 8 UNIT / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "INACTIVATED POLIOVIRUS TYPE III 32 UNIT / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PERTUSSIS TOXOID 25 MCG / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "TETANUS TOXOID 10 LF / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "TETANUS TOXOID ADSORBED 40 MCG / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "MEASLES VIRUS VACCINE LIVE ATTENUATED 1000 UNIT / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "MUMPS VIRUS VACCINE LIVE ATTENUATED (JERYL LYNN STRAIN) 10000 UNIT / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RUBELLA VIRUS VACCINE LIVE ATTENUATED (WISTAR RA27/3 STRAIN) 1000 UNIT / 0.5 ML",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "INACTIVATED POLIOMYELITIS VACCINE (V.C.O.) TYPE 1 MAHONEY",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "INACTIVATED POLIOMYELITIS VACCINE (D.C.O.) TYPE 2 MEF1",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "INACTIVATED POLIOMYELITIS VACCINE (V.C.O.) TYPE 3 SAUKETT",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RECOMBINANT HAEMAGGLUTININ PROTEIN-STRAIN A(H1N1)",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RECOMBINANT HAEMAGGLUTININ PROTEIN-STRAIN A(H3N2)",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RECOMBINANT HAEMAGGLUTININ PROTEIN-STRAIN B (VICTORIA)",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "CORYNEBACTERIUM DIPHTHERIAE CRM-197 PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "ALFA 1-PROTEINASE INHIBITOR (HUMAN)",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "VIRUS-LIKE PARTICLES (VLP) OF SARS-COV-2 SPIKE PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "SARS-COV-2 RECOMBINANT SPIKE PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "BACILLUS CALMETTE-GUÉRIN (BCG) - STRAIN RUSSIAN BCG-I",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 1, 3, 4, 5, 6A, 6B, 7F, 8, 9V, 10A, 11A, 12F, 14, 15B, 18C, 19A, 19F, 22F, 23F, and 33F",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "LUTETIUM (177LU) VIPIVOTIDE TETRAXETAN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "FIMBRIAE TYPES 2 AND 3 (FIM)",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "INACTIVATED POLIOMYELITIS VACCINE (D.C.O) TYPE 1 MAHONEY",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "INACTIVATED POLIOMYELITIS VACCINE (D.C.O.) TYPE 2 M.E.F.1",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "INACTIVATED POLIOMYELITIS VACCINE (D.C.O.) TYPE 3 SAUKETT",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "HEPATITIS B SURFACE ANTIGEN (RECOMBINANT)",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "ANTIHEMOPHILIC FACTOR (RECOMBINANT BDD), FC FUSION PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "COAGULATION FACTOR IX (RECOMBINANT), PEGYLATED",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 1, 3,4, 5, 6A, 6B, 7F, 9V, 14, 18C, 19A, 22F, 23F, 33F",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "INACTIVATED POLIOMYELITIS VACCINE (V.C.O.) TYPE 2 MEF1",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "HAEMOPHILUS INFLUENZAE TYPE B-PRP",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "NEISSERIA MENINGITIDIS GRP B RECOMBINANT LIPOPROTEIN 2086 SUBFAMILY A",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "NEISSERIA MENINGITIDIS GRP B RECOMBINANT LIPOPROTEIN 2086 SUBFAMILY B",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "COAGULATION FACTOR IX (HUMAN)",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 6A",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 6B",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 7F",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 9V",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 18C",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 19A",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 19F",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 22F",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 23F",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 33F",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "EBOLA ZAIRE VACCINE (RVSV [DELTA] G-ZEBOV-GP, LIVE)",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "MENINGOCOCCAL POLYSACCHARIDE ANTIGEN GROUP A",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "MENINGOCOCCAL POLYSACCHARIDE ANTIGEN GROUP C",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "MENINGOCOCCAL POLYSACCHARIDE ANTIGEN GROUP W-135",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "MENINGOCOCCAL POLYSACCHARIDE ANTIGEN GROUP Y",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 1, 3*, 4*, 5* ,6A* ,6B*, 7F*, 8* ,9V* ,10A* ,11A* ,12F* ,14*, 15B* ,18C* ,19A* ,19F*, 22F* ,23F* ,33F",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 10A",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 11A",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 12F",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 15B",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RSV SUBGROUP A STABILIZED PREFUSION F PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "RSV SUBGROUP B STABILIZED PREFUSION F PROTEIN",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "COAGULATION FACTOR IX (RECOMBINANT), ALBUMIN FUSION PROTEIN (RIX-FP)",
                        "url": null,
                        "urls": null
                    },
                    {
                        "text": "VIBRIO CHOLERAE, STRAIN CVD 103-HGR, LIVE",
                        "url": null,
                        "urls": null
                    }
                ]
            },
            {
                "h_title": "Don't see what you're looking for?",
                "main_title": "Search for clinical information on drugs and medical devices",
                "primary_content": [
                    {
                        "text": "Still don’t see what you’re looking for? You can request clinical information for a drug or a medical device.",
                        "url": "https://clinical-information.canada.ca/request-drug-clinical-information",
                        "urls": [
                            {
                                "url": "https://clinical-information.canada.ca/request-drug-clinical-information",
                                "anchor_text": "drug"
                            },
                            {
                                "url": "https://clinical-information.canada.ca/request-device-clinical-information",
                                "anchor_text": "medical device"
                            }
                        ]
                    }
                ]
            },
            {
                "h_title": "Thank you for your help!",
                "main_title": "Search for clinical information on drugs and medical devices",
                "primary_content": [
                    {
                        "text": "You will not receive a reply. For enquiries, contact us.",
                        "url": "https://www.canada.ca/en/contact/index.html",
                        "urls": [
                            {
                                "url": "https://www.canada.ca/en/contact/index.html",
                                "anchor_text": "contact us"
                            }
                        ]
                    }
                ]
            }
        ],
        "__IMTAGGLENGTH__": 5
    }
]

Better.

{{join(map(1.array; "primary_content[].text"); ",")}}

Will combine all the text keys inside the primary_content array with comma (,) as a delimiter.

I didn’t realize primary_content was an array so I needed the [] syntax to reference the element as an array.

You don’t need iterators unless you want the scenario to iterate each element of an array. the map() function when used properly and you understand the syntax is very powerful. Unfortunately you must understand all the nuances of how it works and for that you need to read the docs or try my Make for Newbies video series.

I put together a little tester scenario for you to try. To install the scenario blueprint (JSON) I made follow these steps:

  1. Expand the “Scenario Blueprint” by clicking on the arrow
  2. Copy the blueprint text into your clipboard using the copy button in the top-right of the code block (you can also select the text manually)
  3. Paste the text into a new scenario.

Your new scenario will now have all the modules I used to simulate an attempt at a solution to your question. You may need to confirm the configuration or reselect connections of each imported module in the scenario.

Scenario Blueprint
{
    "subflows": [
        {
            "flow": [
                {
                    "id": 1,
                    "module": "json:ParseJSON",
                    "version": 1,
                    "parameters": {
                        "type": ""
                    },
                    "mapper": {
                        "json": "[\n    {\n        \"array\": [\n            {\n                \"h_title\": \"Search for clinical information on drugs and medical devices\",\n                \"main_title\": \"Search for clinical information on drugs and medical devices\",\n                \"primary_content\": [\n                    {\n                        \"text\": \"Content and search results on this site are in the language provided by the manufacturer. Access and use of clinical information is governed by the Terms of Use.\",\n                        \"url\": \"https://clinical-information.canada.ca/ci-rc/terms\",\n                        \"urls\": [\n                            {\n                                \"url\": \"https://clinical-information.canada.ca/ci-rc/terms\",\n                                \"anchor_text\": \"Terms of Use\"\n                            }\n                        ]\n                    }\n                ]\n            },\n            {\n                \"h_title\": \"Don't see what you're looking for?\",\n                \"main_title\": \"Search for clinical information on drugs and medical devices\",\n                \"primary_content\": [\n                    {\n                        \"text\": \"Still don’t see what you’re looking for? You can request clinical information for a drug or a medical device.\",\n                        \"url\": \"https://clinical-information.canada.ca/request-drug-clinical-information\",\n                        \"urls\": [\n                            {\n                                \"url\": \"https://clinical-information.canada.ca/request-drug-clinical-information\",\n                                \"anchor_text\": \"drug\"\n                            },\n                            {\n                                \"url\": \"https://clinical-information.canada.ca/request-device-clinical-information\",\n                                \"anchor_text\": \"medical device\"\n                            }\n                        ]\n                    }\n                ]\n            },\n            {\n                \"h_title\": \"Drug records\",\n                \"main_title\": \"Search for clinical information on drugs and medical devices\",\n                \"primary_content\": [\n                    {\n                        \"text\": \"MEASLES VIRUS VACCINE LIVE ATTENUATED\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"MUMPS VIRUS VACCINE LIVE ATTENUATED\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"RUBELLA VIRUS VACCINE LIVE ATTENUATED\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"ANTIHEMOPHILIC FACTOR VIII (RECOMBINANT, B-DOMAIN TRUNCATED), PEGYLATED\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 6 L1 PROTEIN\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 11 L1 PROTEIN\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 16 L1 PROTEIN\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 18 L1 PROTEIN\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 31 L1 PROTEIN\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 33 L1 PROTEIN\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 45 L1 PROTEIN\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 52 L1 PROTEIN\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"RECOMBINANT HUMAN PAPILLOMAVIRUS TYPE 58 L1 PROTEIN\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"DIPHTHERIA TOXOID 25 LF / 0.5 ML\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"FILAMENTOUS HAEMAGGLUTININ 25 MCG / 0.5 ML\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"HAEMOPHILUS INFLUENZAE TYPE B-PRP 10 MCG / 0.5 ML\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"HEPATITIS B SURFACE ANTIGEN (RECOMBINANT) 10 MCG / 0.5 ML\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"INACTIVATED POLIOVIRUS TYPE I 40 UNIT / 0.5 ML\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"INACTIVATED POLIOVIRUS TYPE II 8 UNIT / 0.5 ML\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"INACTIVATED POLIOVIRUS TYPE III 32 UNIT / 0.5 ML\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"PERTUSSIS TOXOID 25 MCG / 0.5 ML\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"TETANUS TOXOID 10 LF / 0.5 ML\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"TETANUS TOXOID ADSORBED 40 MCG / 0.5 ML\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"MEASLES VIRUS VACCINE LIVE ATTENUATED 1000 UNIT / 0.5 ML\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"MUMPS VIRUS VACCINE LIVE ATTENUATED (JERYL LYNN STRAIN) 10000 UNIT / 0.5 ML\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"RUBELLA VIRUS VACCINE LIVE ATTENUATED (WISTAR RA27/3 STRAIN) 1000 UNIT / 0.5 ML\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"INACTIVATED POLIOMYELITIS VACCINE (V.C.O.) TYPE 1 MAHONEY\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"INACTIVATED POLIOMYELITIS VACCINE (D.C.O.) TYPE 2 MEF1\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"INACTIVATED POLIOMYELITIS VACCINE (V.C.O.) TYPE 3 SAUKETT\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"RECOMBINANT HAEMAGGLUTININ PROTEIN-STRAIN A(H1N1)\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"RECOMBINANT HAEMAGGLUTININ PROTEIN-STRAIN A(H3N2)\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"RECOMBINANT HAEMAGGLUTININ PROTEIN-STRAIN B (VICTORIA)\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"CORYNEBACTERIUM DIPHTHERIAE CRM-197 PROTEIN\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"ALFA 1-PROTEINASE INHIBITOR (HUMAN)\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"VIRUS-LIKE PARTICLES (VLP) OF SARS-COV-2 SPIKE PROTEIN\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"SARS-COV-2 RECOMBINANT SPIKE PROTEIN\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"BACILLUS CALMETTE-GUÉRIN (BCG) - STRAIN RUSSIAN BCG-I\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 1, 3, 4, 5, 6A, 6B, 7F, 8, 9V, 10A, 11A, 12F, 14, 15B, 18C, 19A, 19F, 22F, 23F, and 33F\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"LUTETIUM (177LU) VIPIVOTIDE TETRAXETAN\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"FIMBRIAE TYPES 2 AND 3 (FIM)\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"INACTIVATED POLIOMYELITIS VACCINE (D.C.O) TYPE 1 MAHONEY\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"INACTIVATED POLIOMYELITIS VACCINE (D.C.O.) TYPE 2 M.E.F.1\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"INACTIVATED POLIOMYELITIS VACCINE (D.C.O.) TYPE 3 SAUKETT\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"HEPATITIS B SURFACE ANTIGEN (RECOMBINANT)\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"ANTIHEMOPHILIC FACTOR (RECOMBINANT BDD), FC FUSION PROTEIN\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"COAGULATION FACTOR IX (RECOMBINANT), PEGYLATED\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 1, 3,4, 5, 6A, 6B, 7F, 9V, 14, 18C, 19A, 22F, 23F, 33F\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"INACTIVATED POLIOMYELITIS VACCINE (V.C.O.) TYPE 2 MEF1\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"HAEMOPHILUS INFLUENZAE TYPE B-PRP\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"NEISSERIA MENINGITIDIS GRP B RECOMBINANT LIPOPROTEIN 2086 SUBFAMILY A\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"NEISSERIA MENINGITIDIS GRP B RECOMBINANT LIPOPROTEIN 2086 SUBFAMILY B\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"COAGULATION FACTOR IX (HUMAN)\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 6A\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 6B\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 7F\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 9V\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 18C\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 19A\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 19F\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 22F\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 23F\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 33F\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"EBOLA ZAIRE VACCINE (RVSV [DELTA] G-ZEBOV-GP, LIVE)\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"MENINGOCOCCAL POLYSACCHARIDE ANTIGEN GROUP A\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"MENINGOCOCCAL POLYSACCHARIDE ANTIGEN GROUP C\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"MENINGOCOCCAL POLYSACCHARIDE ANTIGEN GROUP W-135\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"MENINGOCOCCAL POLYSACCHARIDE ANTIGEN GROUP Y\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 1, 3*, 4*, 5* ,6A* ,6B*, 7F*, 8* ,9V* ,10A* ,11A* ,12F* ,14*, 15B* ,18C* ,19A* ,19F*, 22F* ,23F* ,33F\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 10A\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 11A\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 12F\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"PNEUMOCOCCAL POLYSACCHARIDE SEROTYPE 15B\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"RSV SUBGROUP A STABILIZED PREFUSION F PROTEIN\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"RSV SUBGROUP B STABILIZED PREFUSION F PROTEIN\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"COAGULATION FACTOR IX (RECOMBINANT), ALBUMIN FUSION PROTEIN (RIX-FP)\",\n                        \"url\": null,\n                        \"urls\": null\n                    },\n                    {\n                        \"text\": \"VIBRIO CHOLERAE, STRAIN CVD 103-HGR, LIVE\",\n                        \"url\": null,\n                        \"urls\": null\n                    }\n                ]\n            },\n            {\n                \"h_title\": \"Don't see what you're looking for?\",\n                \"main_title\": \"Search for clinical information on drugs and medical devices\",\n                \"primary_content\": [\n                    {\n                        \"text\": \"Still don’t see what you’re looking for? You can request clinical information for a drug or a medical device.\",\n                        \"url\": \"https://clinical-information.canada.ca/request-drug-clinical-information\",\n                        \"urls\": [\n                            {\n                                \"url\": \"https://clinical-information.canada.ca/request-drug-clinical-information\",\n                                \"anchor_text\": \"drug\"\n                            },\n                            {\n                                \"url\": \"https://clinical-information.canada.ca/request-device-clinical-information\",\n                                \"anchor_text\": \"medical device\"\n                            }\n                        ]\n                    }\n                ]\n            },\n            {\n                \"h_title\": \"Thank you for your help!\",\n                \"main_title\": \"Search for clinical information on drugs and medical devices\",\n                \"primary_content\": [\n                    {\n                        \"text\": \"You will not receive a reply. For enquiries, contact us.\",\n                        \"url\": \"https://www.canada.ca/en/contact/index.html\",\n                        \"urls\": [\n                            {\n                                \"url\": \"https://www.canada.ca/en/contact/index.html\",\n                                \"anchor_text\": \"contact us\"\n                            }\n                        ]\n                    }\n                ]\n            }\n        ],\n        \"__IMTAGGLENGTH__\": 5\n    }\n]"
                    },
                    "metadata": {
                        "designer": {
                            "x": 0,
                            "y": 0
                        },
                        "restore": {
                            "parameters": {
                                "type": {
                                    "label": "Choose a data structure"
                                }
                            }
                        },
                        "parameters": [
                            {
                                "name": "type",
                                "type": "udt",
                                "label": "Data structure"
                            }
                        ],
                        "expect": [
                            {
                                "name": "json",
                                "type": "text",
                                "label": "JSON string",
                                "required": true
                            }
                        ]
                    }
                },
                {
                    "id": 2,
                    "module": "util:SetVariables",
                    "version": 1,
                    "parameters": {},
                    "mapper": {
                        "variables": [
                            {
                                "name": "text",
                                "value": "{{join(map(1.array; \"primary_content[].text\"); \",\")}}"
                            }
                        ],
                        "scope": "roundtrip"
                    },
                    "metadata": {
                        "designer": {
                            "x": 300,
                            "y": 0
                        },
                        "restore": {
                            "expect": {
                                "variables": {
                                    "items": [
                                        null
                                    ]
                                },
                                "scope": {
                                    "label": "One cycle"
                                }
                            }
                        },
                        "expect": [
                            {
                                "name": "variables",
                                "type": "array",
                                "label": "Variables",
                                "spec": [
                                    {
                                        "name": "name",
                                        "label": "Variable name",
                                        "type": "text",
                                        "required": true
                                    },
                                    {
                                        "name": "value",
                                        "label": "Variable value",
                                        "type": "any"
                                    }
                                ]
                            },
                            {
                                "name": "scope",
                                "type": "select",
                                "label": "Variable lifetime",
                                "required": true,
                                "validate": {
                                    "enum": [
                                        "roundtrip",
                                        "execution"
                                    ]
                                }
                            }
                        ],
                        "interface": [
                            {
                                "name": "text",
                                "label": "text",
                                "type": "any"
                            }
                        ]
                    }
                }
            ]
        }
    ],
    "metadata": {
        "version": 1
    }
}


Alex Sirota

:heart_on_fire: Check out Make for Make Newbies Video Series :heart_on_fire:

My Solutions on Make Community

Thanks Alex!

This is ALMOST there. Here is the output of the Set Multiple Variables module:

It looks like it is only taking the 1st text of each primary_content. How do I get it so it takes all text under each primary_content? In the below JSON, under the 3rd collection, there are many text items.

ah ha! I found the answer here: How do I gather all of the item values within a subarray of multiple collections? - #2 by Bjorn.drivn

I added the map() and flatten() to get a sub-array

and that got me the output I was looking for:

Here is the blueprint in case any one else is looking for some help.

blueprint (1).json (24.3 KB)

3 Likes