Reference here, but a little vague could do with a few more use cases please
Oh, man. Thatās such a cool update!
This is fantastic news. Generating text summaries of invoices used to be a major pain (e.g. trying to get āQUANTITYx PRODUCTNAMEā) displayed properly with each item on a new line.
To make sure, does the delimiter support āline_breakā like the concatenation function does? Or can we just input a newline and it will work?
Very useful for APIs
Yeah handy in generating a concatenated output of a data type and say using that data in an email for line items, the ability to keep looping with the āThis [data type]
ā and keep working on the same item to generate the string is really useful.
This is incredibly powerful as it allows you to āiterateā on each item in a list. I just used this to create a subtotal of a shopping cart I have in a RG [Take the RG list, for each, take quantity * price]. Previously, I was forced to use plugins to grab data within the RG.
Keep the list functionality comin!
Wow, that is a great feature. Canāt believe Bubble was so quiet about this
Iām building a plugin to issue fiscal invoices, and a major problem was to send an array of items into the JSON body. With this feature, itās now solved!
Thank you for bringing this to light, @luke2
Agreed - @Bubble Iāve used this about 50 times today for all sorts of thingsā¦ Incredible feature.
For whoever is still wondering this is awesome to reach out to an external API that requires you to build a JSON text body with a variable amount of items.
So letās say they want you to send a name.
Youād send this text:
{
name: "Vini"
}
By wrapping it like this
{
name: "Selected Humans's name"
}
But what if you want to send as many humans as there are in your database? You canāt type that statically.
So you use this feature and wrap it like this:
{
name: "This Humans's name"
}
So if you pass a list with three Humans, it will be like this:
{
name: "Vini"
},
{
name: "Renato"
},
{
name: "Luke"
},
Now you can safely pass as many Humans as you want.
Note that we already could do this, it was just tougher and often required plugins.
There are other use cases too, wrapping texts and building JSON bodies for external APIs is just one that has crossed my mind.
Whoa! This is huge! Amazing for sending data to an API but also opens a host of possibilities for calculations as well.
@nnich19, how we could have used this recently!
Easy HTML tables in emails
Dynamic CSS on pages
Export CSV Files with the CSV Creator plugin and include any calculated values that are possible to display in an RG
ā¦ Just a few offhand uses for this.
@bubble should be making a big deal about this!
One thing is we still should JSON stringify text content that has special characters.
Not a valid JSON due to double quotes and new line:
{
"first_name": "John",
"last_name": "Connor",
"description": "John Connor is a fictional major character in the "Terminator" franchise.
Skynet ..."
}
Hey folks ā super glad to see that youāve noticed this and are enjoying the feature! Weāve kept it a bit quiet to make sure that we can address any bug reports promptly as they happen ā a feature like this can be tricky to release! ā so please do ping us if you see something unexpected. Otherwise, please enjoy!
This is a truly great update.
Now, we donāt need to use or build custom plugins to achieve specific goals. So, it saves time.
But, as an additional operator, it would be great if you can provide JSON stringify:
In short, it helps to prepare HTML templates, JSON objects for the API connector, etc.
Thanks!
This feature is amazing!
Iāve noticed a bug : if the delimiter is empty, itās replaced by ā, nullā
Incredible!! Huge thanks to the @Bubble team for this! Canāt wait to use it!
Pretty damn awesome
What is the delimiter for a line break?
@luke2 Thank you so much for pointing this new feature out! I had to do some crazy workarounds using the List Item Expression plugin (or was that part of the Toolkit plugin?) and loads of JavaScript to get what I needed for my app, and now I can replace it all with something so simple and elegant and natively Bubble. Iām over the moon right now. This was a desperately needed feature.