Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by LZYGYZ · May 18, 2017 at 11:02 AM · c#unity 5wwwdatabaserequest

How to get specific data from CURL in unity

I am trying to get specific data from CURL but i get whole data Here is the code using System.Collections; using System.Collections.Generic; using UnityEngine;

 public class getRequest : MonoBehaviour {
 
     // Use this for initialization
     void Start () {
         string url = "https://blockchain.info/ticker";
         WWW www = new WWW(url);
         StartCoroutine(WaitForRequest(www));
 
     }
     IEnumerator WaitForRequest(WWW www)
     {
         yield return www;
 
         // check for errors
         if (www.error == null)
         {            
             Debug.Log("WWW Ok!: " +www.data);
         }
         else
         {
             Debug.Log("WWW Error: " + www.error);
         }
     }
 }
 

Geting OUTPUT like this WWW Ok!: { "USD" : {"15m" : 1740.01, "last" : 1740.01, "buy" : 1740.01, "sell" : 1744.74, "symbol" : "$"}, "ISK" : {"15m" : 179479.11, "last" : 179479.11, "buy" : 179479.11, "sell" : 179967, "symbol" : "kr"}, "HKD" : {"15m" : 13551.08, "last" : 13551.08, "buy" : 13551.08, "sell" : 13587.92, "symbol" : "$"}, "TWD" : {"15m" : 52292.17, "last" : 52292.17, "buy" : 52292.17, "sell" : 52434.32, "symbol" : "NT$"}, "CHF" : {"15m" : 1733.63, "last" : 1733.63, "buy" : 1733.63, "sell" : 1738.35, "symbol" : "CHF"}, "EUR" : {"15m" : 1584.76, "last" : 1584.76, "buy" : 1584.76, "sell" : 1589.07, "symbol" : "€"}, "DKK" : {"15m" : 11790.2, "last" : 11790.2, "buy" : 11790.2, "sell" : 11822.25, "symbol" : "kr"}, "CLP" : {"15m" : 1161247.87, "last" : 1161247.87, "buy" : 1161247.87, "sell" : 1164404.58, "symbol" : "$"}, "CAD" : {"15m" : 2373.57, "last" : 2373.57, "buy" : 2373.57, "sell" : 2380.02, "symbol" : "$"}, "INR" : {"15m" : 111442.86, "last" : 111442.86, "buy" : 111442.86, "sell" : 111745.8, "symbol" : "₹"}, "CNY" : {"15m" : 11994.67, "last" : 11994.67, "buy" : 11994.67, "sell" : 12027.28, "symbol" : "¥"}, "THB" : {"15m" : 60079.94, "last" : 60079.94, "buy" : 60079.94, "sell" : 60243.26, "symbol" : "฿"}, "AUD" : {"15m" : 2342.53, "last" : 2342.53, "buy" : 2342.53, "sell" : 2348.9, "symbol" : "$"}, "SGD" : {"15m" : 2434.82, "last" : 2434.82, "buy" : 2434.82, "sell" : 2441.44, "symbol" : "$"}, "KRW" : {"15m" : 1943939.17, "last" : 1943939.17, "buy" : 1943939.17, "sell" : 1949223.53, "symbol" : "₩"}, "JPY" : {"15m" : 197725.17, "last" : 197725.17, "buy" : 197725.17, "sell" : 198262.66, "symbol" : "¥"}, "PLN" : {"15m" : 6655.07, "last" : 6655.07, "buy" : 6655.07, "sell" : 6673.16, "symbol" : "zł"}, "GBP" : {"15m" : 1347.87, "last" : 1347.87, "buy" : 1347.87, "sell" : 1351.53, "symbol" : "£"}, "SEK" : {"15m" : 15356.67, "last" : 15356.67, "buy" : 15356.67, "sell" : 15398.41, "symbol" : "kr"}, "NZD" : {"15m" : 2522.84, "last" : 2522.84, "buy" : 2522.84, "sell" : 2529.69, "symbol" : "$"}, "BRL" : {"15m" : 5391.27, "last" : 5391.27, "buy" : 5391.27, "sell" : 5405.92, "symbol" : "R$"}, "RUB" : {"15m" : 98152.22, "last" : 98152.22, "buy" : 98152.22, "sell" : 98419.04, "symbol" : "RUB"}
}

But i want output like this USD 1740.01 $

Can any one please help me

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

get_version can only be called from the main thread. 0 Answers

Bool condition is always resulting in false even when it seems impossible to be false even using debug lines to check 4 Answers

Unity - database for keeping score? 1 Answer

How to import wav file trough script from Project folder? 0 Answers

Remote database for leaderboard 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges