What is an array, an object, a collection of items?

Sometimes it is useful to go back to basics. Understanding data structures is paramount to your effective use of Make.

Here’s some short and sweet descriptions of basic data structures. In fact these definitions are pretty much in every programming language.

And here’s a really nice video on the topic of data structures:

Don’t worry that this reference is from another automation system. This basic information is crucial core knowledge, and I haven’t seen it described as concisely as I have in the n8n docs.

In these docs the word items is used whereas in Make the equivalent is a collection. So in Make the terminology is a bit different (I wish they weren’t), but the abstract concepts are the same:

A Collection is an Array of Objects. Objects are composed of Key/Value pairs. A Value can have a piece of text, date, number, binary data, an array or an object.

Arrays can be nested as well. The nesting can make things look complex but if you understand the basic ideas you should not get lost with nested arrays.

A Bundle is a structure unique to Make. You can think of it as a “basket” of information that you process through a scenario. Processing a bundle creates the necessary looping in a scenario to process subsequent modules with a bundle. I like to think of a bundle as a row of data that can have all sorts of stuff in it I wish to process.

Ps. The Make docs on item data types is inadequate in my opinion. For example, bundles are never really described anywhere in the Make docs.

2 Likes

Thank you so much for creating this post @alex.newpath , brilliant stuff :pray:

Since we’re on the topic of data structures, I wanted to also bring the community’s attention to a summary of item data types created by @Drivn.agency over here: [Make Bot Questions] Item data types explained?