Forum Discussion

benrizz17's avatar
benrizz17
Qrew Member
6 months ago
Solved

JSON Array Iteration

I have a pipeline set up to Fetch JSON from a third party application and iterate over JSON records. It returns the results without an issue, however the main data I want to extract from the results ...
  • JenniferMarque1's avatar
    JenniferMarque1
    6 months ago

    It looks like your use case is a little different than mine.  I actually receive the Customer IDs (or Part IDs in your case) two different ways in the data from my other application.  I get it like you do (I had left this part out of my original schema sample I showed previously just due to length):

    ...
        "DateModified": "2025-06-12T16:19:02-05:00",
        "CustomerIDs": [
            405
        ],
        "SiteIDs": [
            778
        ],
        "Customers": [
            {
                "ID": 405,
                "CompanyName": "CompanyA",
                "GivenName": "",
                "FamilyName": ""
            }
        ],
    ...

    So I get "CustomerIDs" in an array, but I also get additional data (including the ID) in the "Customers" array.

    If I recall, I had difficulty pulling data from the CustomerIDs array which is why I started using the Customers array.  The only info I'm pulling is the ID, so if I could have gotten CustomerIDs to work I would have used that.  I know when I look at what's available to me for that step in the Quick Reference Widget, CustomerIDs has the icon (and different color) that I assume indicates it's an array. However, it doesn't expand like the Customers array does.  I assume it has something to do with that but don't know exactly what.

    So unfortunately I don't know if I can be much more help.  Maybe someone else will have some additional information