extract value from array
Options
TJ
Member ✭
External API response is a single array with decimal value in it.
last: [31.8]
How do I extract the value to be able to use it for math operations after? The value is dynamic and pulling from external API.
Answers
-
Hey @TJ!
You can save the number by mapping to it using dot notation.
Assuming that the External API response is in the form of an object, like this:
{"last":[31.8]}
Here is what it would look like.
You can then use the variablenumber
to perform mathematical operations.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback