How to ensure array fields return [ ] instead of null when empty (for Bubble compatibility)?

Hey all!

Im a bit stuck with something and not sure how to approach this:

I have a field in my table that's set as an array (e.g., active_dates).
When the field has no values, Xano returns "active_dates": [], and everything works perfectly in Bubble.

However, when I manually delete the value from that field (e.g., via the database view - as can be seen in the image), the field becomes null, and Bubble breaks with a SyntaxError or data mismatch because it expects a list.

I tried using a Get filter on the field in my API response to make sure than I return an array as default:

But the get filter doesn't seem to work. The response is returned as in the image and things break over on bubble's side

Am I missing something in how filters or Set Value blocks work for arrays in this case?
Is there a best practice to enforce empty arrays ([]) instead of null for empty array fields in the response?

Would appreciate any suggestions 🙏🏻

2 replies