Parsing a String to Float #596
Answered
by
udoprog
physics515
asked this question in
Q&A
-
Hello All, Am I missing something? I've looked through the available docs and tried to make it up with every way that it makes sense to me but with no success. The API returns the price as a JSON string. How do I get price to return as float?
Thank you for your help! |
Beta Was this translation helpful? Give feedback.
Answered by
udoprog
Aug 2, 2023
Replies: 1 comment 1 reply
-
Did you try? let price = f64::parse(json[0]["assetPriceUSD"])?;
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
physics515
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Did you try?