Xanomorph

Share this post

Don't use decimal keys when accessing Xano objects; use integers instead

www.xanomorph.com

Discover more from Xanomorph

Tips and tricks when building a no-code back-end using Xano.
Continue reading
Sign in

Don't use decimal keys when accessing Xano objects; use integers instead

Another thing I wish I knew beforehand.

Walter Haydock
Mar 6, 2023
Share this post

Don't use decimal keys when accessing Xano objects; use integers instead

www.xanomorph.com
2
Share

Do not use a decimal as the key for accessing a value in an a Xano object; convert the key to an integer first. Trying to access a value with a decimal key will return null.

E.g. do this:

Get 10% off Xano!

Not this:

I couldn’t find an explanation of this behavior in the documentation, so thought I would share it with you here.

This is probably something I should know if I were a trained developer, but I’m not. And you probably aren’t either, so here you go.

Thanks for reading Xanomorph! Subscribe for free to receive new posts and let me know my work is useful.

Share this post

Don't use decimal keys when accessing Xano objects; use integers instead

www.xanomorph.com
2
Share
2 Comments
Share this discussion

Don't use decimal keys when accessing Xano objects; use integers instead

www.xanomorph.com
Shubham Chavan
May 29Liked by Walter Haydock

Maybe be the "." dot notation in the decimal caused it to find the [0] index of the decimal number so for decimal '1000.1' is converted to 1000.[1] under the hood in xano. I think if you use '..' double dot notation to access the object instead it should work.

Expand full comment
Reply
Share
1 reply by Walter Haydock
1 more comment...
Top
New
Community

No posts

Ready for more?

© 2023 Walter Haydock
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing