Hi all,
sorry if this could be a stupid question, I have been working with EasyMorph for 2 days.
I need to have a Json body starting and closing with square brackets, but I didn’t find a way to do this, as the json form automatically opens and closes with curly brackets.
Yes, that's correct. The result of Construct JSON would be a 1-row table (if no grouping applied). You can use the "Iterate web request" action as it allows assigning request body from a column in EasyMorph. Since the table has only 1 row, the "Iterate web request" action will send only 1 request which will make it similar to the regular "Web request" action.
Hi Dmitry,
the “Construct JSON” works perfectly and create the array as I need, but when I send the request with “Iterate Web Request” if I use json content-type (mandatory for my request), the request starts always with curly brackets. This is not good for me.
Aha, I see. I think instead of Iterate + Web Request in a module you should just use the “Iterate Web Request” action right in the main module without any additional iteration or module.
You’re using the “Iterate Web Request” action in the “JSON” mode. The mode constructs a JSON and that’s why you see your argument wrapped in curly braces. But you already have the JSON constructed! Therefore you should use the “Iterate Web Request” action in the “Column” mode in the main module (where you constructed the JSON).
Yes, if I use column the format is perfect, but unfortunately the request failed, as the method I use needs json and with column the content-type is text.
(I also check with Postman, I need to use a Json content)