Kris
December 9, 2024, 2:10am
1
I get the following error when trying to map a value:
“Failed to map ‘brand’: Function ‘ifempty’ finished with error! Function ‘map’ finished with error! ‘{empty}’ is not a valid key.”
blueprint (8).json (57.1 KB)
The array / collection i am mapping over is dynamic and the key may or may not be there at certain times.
For example, the following linked json has the “brand” & “model” listed:
https://gtnadminassets.blob.core.windows.net/productdatav3/t_shirts.json
The next json, which is the same format & structure, however, does not have “brand” or “model” listed:
https://gtnadminassets.blob.core.windows.net/productdatav3/accent_mugs.json
samliew
December 11, 2024, 5:33am
2
Welcome to the Make community!
Firstly, you cannot use ifempty with an array.
Secondly, for the MAP function, you need to manually type in the parameters, and NOT select from the variables panel.
So, you need to type values.1.name
and name
respectively.
Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —
Getting Started
Help Centre Basics
Articles & Videos
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.
2 Likes
Kris
December 11, 2024, 4:14pm
3
Thank you @samliew ! Didn’t realize it was such a simple mistake I was making. I will definitely invest more time in the academy