I have a simple php script that outputs an array of strings using the json_encode method at the backend. it outputs it like so:
["8090123","8090456","8090789","8090321","8090654"]
Now, I want to parse it in my C# code but I can't seem to parse it properly.
Below is my C# code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication5
{
class Program
{
static void Main(string[] args)
{
using (WebClient wc = new WebClient())
{
string myString = wc.DownloadString("https://magforex.biz/list.php");
string[] words = myString.Split(',');
for (var i = 0; i < words.Length; i++)
{
// i just hardcoded the index for now
Console.WriteLine(words[0]);
break;
}
Console.ReadLine();
}
}
}
}
The code runs just fine but it outputs the following result ["8090123" which is not what I wanted.
Sorry as I am just starting out with C# and has limited knowledge about it.
All I want is just the string 8090123 so that I can do a comparison later.
Thanks for helping out in advance.