Double issues : one with \" in JSON array and another with Date formatting

Hello,

Issue 01

I am using the “Create Json” object, with an Array called “Product_Tags”.

When mapping with [“1”,“2”] makes formats the array like this :

image

How can I avoid the automatic echappement ?

Issue 02

I need to output a date in a specific format “YYYY-MM-DD HH:mm:ss”
I am pulling the data from a google sheet doc where the date is “YYYY-MM-DD”
image

I use for formatDate formula in a Array aggregator module
image
The output is not formatted properly
image
So in my Create JSON module, the date is showing like this
image

Many thanks

Welcome to the Make community!

You’ll have to use an iterator + array aggregator module, or convert your text 1,2 into an array like this:

{{ split("1,2"; ",") }}

You have to parse a date-like string type into a date type, by using the built-in function parseDate, before you can use formatDate.

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 —

General

Help Center Basics

Articles & Videos

samliewrequest private consultation

Join the unofficial Make Discord server to chat with other makers!

2 Likes

Thank you a lot @samliew

I was able to fix the array issue with split(:wink:

However, I am still struggling with the dateformat, I have tried with this formula : formatDate(parseDate(“date”;YYYY-MM-DD);YYYY-MM-DD) and still had the HH:mm:ssss indication.

As you can see I have even tried to make it manually
image
and the output still contains hh:mm:ssss
image

Any idea of what I am doing wrong ?

Thank you

No problem, glad I could help!

1. If anyone have a new question in the future, please start a new thread for each question. This keeps the forum organised and makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help since newer questions are monitored closely.

2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.

This marks the topic as solved, so that:

others can save time when catching up with the latest activity here, and

  • allows others to quickly jump to the solution if they come across the same problem

To do this, simply click the checkbox at the bottom of the post that answers your question:
Screenshot_2023-10-04_161049

3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!

samliewrequest private consultation

Join the unofficial Make Discord server to chat with us!

1 Like