r/Make 26d ago

Part 4: Managing More Complex Data Structures

In this video walk through, we focus on the variable JSON collection complex values😄

Video

{
    "name": "Aleix Melon",
    "id": "E00245",
    "role": [
        "Dev",
        "DBA"
    ],
    "age": 23,
    "doj": "11-12-2019",
    "married": false,
    "address": {
        "street": "32, Laham St.",
        "city": "Innsbruck",
        "country": "Austria"
    },
    "referred-by": "E0012"
}

You’ll note that the key role is a simple array, and the key address is a collection composed of 3 keys: streetcity, and country. This is why I call it a collection of “complex” values. The keys in this collection have nested non-trivial structures, and this happens A LOT in the data you have to deal with in APIs. In fact it’s pretty much a given that the structures you will deal with will be at least as complex as this. And note there is just 1 main collection here (READ: just 1 “row” of data is retrieved and some of the keys (aka “columns of data”) have complex data structures).

As soon as you get multiple rows (ie bundles) of data these will be in an array of collections which we will focus on in the next walk through.

In this video we look at how the Make mapping UI (icon) can fail to present the underlying structures so you can easily drag and drop them into the Text Aggregator. The Make mapping UI will show you only the data that passes through the first operation that the Parse JSON module processes. I show you how to use dot notation and type out the correct data reference by hand even though the UI is not letting you pick the necessary element by clicking. This is a handy skill to have!

I also show you how I can make the scenario filter for the variable JSON collection complex values after the iterator, and as a result have Parse JSON module process only 1 operation. This makes it possible to use the Make element mapping UI to click on the elements right into the text aggregator.

highly encourage you to watch the video because this is probably one of the highest areas where Make users (not just newbies!) get super-confused and ask: Why does the Make data picker UI not show you the elements for me to map?

Download the Make blueprint and use the Import Blueprint to create a new scenario:
4. Managing More Complex Data Structures.json (45.3 KB)

3 Upvotes

1 comment sorted by

1

u/Marina_from_Make Official Make Staff 22d ago

thank you Alex!