//3.แสกนค่าตัวแปร "V" ที่ได้จาก tagname เพื่อดึงค่ามาเก็บลง variable x  ----------------เสร็จกระบวนการของ Distributer
        public static String getValueFromJson(String tag_name)
        {
            JObject jsonResponse = DistributerController.getJsonResponse();

            string x = jsonResponse["readResults"].ToString();

            //แสกนค่าแต่ละตัวที่เป็นตัวแปร v
            foreach (var jsonArray in jsonResponse["readResults"])
            {
                //เช็ค JSON ค่า "id" ว่าตรงกับ tagname มั้ยถ้าใช่สั่งสแกนค่า v
                if (jsonArray["id"].ToString() == tag_name)
                {
                    x = jsonArray["v"].ToString();
                    //Debug.WriteLine(jsonArray["id"].ToString() + ">>>>>>" + x);
                    try
                    {
                        collectJsonValueToDB(jsonArray["id"].ToString(), Double.Parse(x));
                    }
                    catch (System.FormatException)
                    {
                    }
                }
            }
            //ได้ค่า Jresult ที่แสกนจาก readresult แล้ว JObject ก็จะเป็นค่าที่ต้องการ
            return(x);
        }
        public static void getValueFromJson()
        {
            JObject jsonResponse = DistributerController.getJsonResponse();
            //Debug.WriteLine(jsonResponse);
            string x = jsonResponse["readResults"].ToString();

            //Debug.WriteLine("JSON = "+x);
            foreach (var jsonArray in jsonResponse["readResults"])
            {
                x = jsonArray["v"].ToString();
                try
                {
                    collectJsonValueToDB(jsonArray["id"].ToString(), Double.Parse(x));
                }
                catch (System.FormatException ex)
                {
                }
            }
        }