• Instructions to Ask a Question

    Click on the "Ask a Question" button and select the application for which you would like to ask questions.

    We have 5 different products namely - Pabbly Connect, Pabbly Subscription Billing, Pabbly Email Marketing, Pabbly Form Builder, Pabbly Email Verification.

    The turnaround time is 24 hrs (Business Hours - 10.00 AM to 6.00 PM IST, Except Saturday and Sunday). So your kind patience will be highly appreciated!

    🚀🚀Exclusive Discount Offer

    Just in case you're looking for any ongoing offers on Pabbly, you can check the one-time offers listed below. You just need to pay once and use the application forever -
     

    🔥 Pabbly Connect One Time Plan for $249 (🏆Lifetime Access) -  View offer 

    🔥 Pabbly Subscription Billing One Time Plan for $249 (🏆Lifetime Access) - View offer

Array Reverse removes HTML formatting in JSON

Your Task History ID
IjU3NjYwNTZmMDYzMTA0M2M1MjZiNTUzNTUxMzAi_pc
Hi,
when using the Array Reverse function the HTML format is being removed.

For example:
{"id":4471409,"status":"published","html":"OpenAI's structure is changing!<br\/><br\/>Ultimately their goal is to double down on AGI for everyone to use.<br\/><br\/>Back in 2015, their goal was \"advancing digital intelligence for humanity's benefit without profit motives.\"<br\/><br\/>Obviously, that won't work in the long run if they are just burning money.<br\/><br\/>🧵 1\/2<br\/&g ...

Would become:
{"id":4471409,"status":"published","html":"OpenAI's structure is changing!Ultimately their goal is to double down on AGI for everyone to use.Back in 2015, their goal was \"advancing digital intelligence for humanity's benefit without profit motives.\"Obviously, that won't work in the long run if they are just burning money.🧵 1\\\/2...

Thanks for letting me know how I can resolve this issue.
 

ArshilAhmad

Moderator
Staff member
Sure, added the worflow ID as the "task history" in the thread, but here is it @ArshilAhmad : IjU3NjYwNTZmMDYzMTA0M2M1MjZiNTUzNTUxMzAi_pc
Apologies for the oversight. We have added a Text Formatter to your workflow to transform Markdown to HTML. Please check if that gives you the desired result.
1736273037882.png
 
I am confused as to why there's a need to add markdown to HTML, the API returns a JSON with an HTML value already, so the Text Transformer HTML to Markdown is normally fine. The issue happens when we do Array Reverse, if you look the HTML values in the JSON is fine before, then after the Array Reverse the HTML (all the `<br/>` ) disappears when they shouldn't.
 

ArshilAhmad

Moderator
Staff member
Please allow us some time to look into this concern. We will get back to you with an update soon.
 

ArshilAhmad

Moderator
Staff member
Our technical team is working on fixing the issue related to the <br/> tags being removed in the Array Reverse action step. In the meantime, as a workaround, we have added a Text Formatter to your workflow to reinsert the <br/> tags into the text.
1736361638712.png
 

Preeti Paryani

Well-known member
Staff member
Hello @hugohamelcom,

The previous "Array Reverse" module has been deprecated, and a new one has been introduced. Please try using the Array Function (Pabbly): Reverse Array action and let us know if it works as expected.

Looking forward to your feedback.
 
Hello @hugohamelcom,

The previous "Array Reverse" module has been deprecated, and a new one has been introduced. Please try using the Array Function (Pabbly): Reverse Array action and let us know if it works as expected.

Looking forward to your feedback.
There are multiple issues:
1. The array reverse is not reversing the array, it is returning the original order.
2. The array reverse is removing elements from the array, for example, in my original array I have `"replyCount":0,"repostCount":0,"likeCount":0,"quoteCount":0` but in the reversed array response, it is not there anymore.
3. The array reverse is not holding the HTML correctly, but when the simple response is unchecked, and you try to use an Iterator after, the iterator isn't working correctly.
The iterator then return back the full JSON rather than the first response in the JSON. At first I thought I just needed to use a JSON extractor after, but I noticed in the respose of the JSON extractor that the whole data set was there instead of the first data element. The issue comes from the fact that if the JSON added to the Array reverse is [{}] then it'll add extra brackets around it becoming [[{}]]. To fix it, I had to add two Iterrator, one after the other one.
4. It seems to be causing often RESULT_CODE_HUNG when the JSON is long.

Important Note: In the future, I would appreciate that you are testing a bit more your new functions before pushing them to production, as right now, this change broke many of my workflows and they are not usable anymore... And since the old array reverse is depreciated, I can't reverse back to it.
 
Last edited:

Preeti Paryani

Well-known member
Staff member
Hello @hugohamelcom,

The issue with the Array Reverse action has been resolved. Now, the array will be reversed while returning the response within double array literals. However, we are unable to find these details in the actual array response. Could you please specify which step you are retrieving them from?
"replyCount":0,"repostCount":0,"likeCount":0,"quoteCount":0`
 
Hello @hugohamelcom,

The issue with the Array Reverse action has been resolved. Now, the array will be reversed while returning the response within double array literals. However, we are unable to find these details in the actual array response. Could you please specify which step you are retrieving them from?
Good news! Most of the issues have been resolved, apart from #2, as some elements in the array are removed.

For example, if the JSON looks like this:
JSON:
{
  "feed": [
    {
      "post": {
        "uri": "at://did:plc:hx55hefp4eafknwzykqq6nje/app.bsky.feed.post/3linbzjvtaf2i",
        "cid": "bafyreieeey25p3rudcrjaib6ka4s4o7nop7ht64veph243u57kc2j7qkf4",
        "author": {
          "did": "did:plc:hx55hefp4eafknwzykqq6nje",
          "handle": "hugohamel.com",
          "displayName": "Hugo Hamel",
          "avatar": "https://cdn.bsky.app/img/avatar/plain/did:plc:hx55hefp4eafknwzykqq6nje/bafkreiba5chbxrrycxbah7gtckxrfszkmytz33tl2a4476b2f3rgqdvjei@jpeg",
          "labels": [],
          "createdAt": "2024-11-06T11:00:43.083Z"
        },
        "record": {
          "$type": "app.bsky.feed.post",
          "createdAt": "2025-02-20T22:00:02.959940Z",
          "facets": [],
          "langs": [
            "en"
          ],
          "text": "Just found out about Repomix 📦\n\nNo more manual copy/paste of code in a single file\n\nNow, I just select the files/folders and run it ▶️\n\nThe Repomix Runner extension from  makes it 10x easier"
        },
        "replyCount": 2,
        "repostCount": 0,
        "likeCount": 1,
        "quoteCount": 0,
        "indexedAt": "2025-02-20T22:00:03.352Z",
        "labels": []
      }
    }
  ],
  "cursor": "2025-02-20T22:00:02.959Z"
}

Then after the array reverse, the array will look like this:
Code:
[
    {
        "post":{
            "0":"at:\\\/\\\/did:plc:hx55hefp4eafknwzykqq6nje\\\/app.bsky.feed.post\\\/3linbzjvtaf2i",
            "1":"bafyreieeey25p3rudcrjaib6ka4s4o7nop7ht64veph243u57kc2j7qkf4",
            "2":{
                "did":"did:plc:hx55hefp4eafknwzykqq6nje",
                "handle":"hugohamel.com",
                "displayName":"Hugo Hamel",
                "avatar":"https:\\\/\\\/cdn.bsky.app\\\/img\\\/avatar\\\/plain\\\/did:plc:hx55hefp4eafknwzykqq6nje\\\/bafkreiba5chbxrrycxbah7gtckxrfszkmytz33tl2a4476b2f3rgqdvjei@jpeg",
                "createdAt":"2024-11-06T11:00:43.083Z"
            },

            "3":{
                "$type":"app.bsky.feed.post",
                "createdAt":"2025-02-20T22:00:02.959940Z",
                "langs":["en"],
                "text":"Just found out about Repomix 📦\n\nNo more manual copy\\\/paste of code in a single file\n\nNow,
                 I just select the files\\\/folders and run it ▶️\n\nThe Repomix Runner extension from  makes it 10x easier"
            },
            "4":2,
            "5":1,
            "indexedAt":"2025-02-20T22:00:03.352Z"
        }
    }
]

As you can see the structure is changed, and values (mostly empty ones) are being renamed and some removed. For example, in `"replyCount":2,"repostCount":0,"likeCount":1,"quoteCount":0, "label":[]`, repostCount, quoteCount, and label have been removed.
 
Top