Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi!

I would like to reda Json array in C# . How should I do that? My problem is to read json arrays ..

"Cars": {
      "Volvo": [ "S40", "s60", "v40", "v60", "v90"],
      "BMW": [ "X3", "X5", "X6", "520", "530", "330", MG"]
    },


Public void Check (string input)
{
 If input == car.volvo
Read all volvo cars
Else if (input == car.BMW)
Read all BMW cars
…
}


What I have tried:

I would like to reda Json array in C# . How should I do that? My problem is to read json arrays ..

"Cars": {
      "Volvo": [ "S40", "s60", "v40", "v60", "v90"],
      "BMW": [ "X3", "X5", "X6", "520", "530", "330", MG"]
    },


Public void Check (string input)
{
 If input == car.volvo
Read all volvo cars
Else if (input == car.BMW)
Read all BMW cars
…
}
Posted
Updated 7-Sep-21 5:46am
v2

1 solution

 
Share this answer
 
Comments
CPallini 7-Sep-21 12:04pm    
5.
Richard MacCutchan 7-Sep-21 12:05pm    
Thanks, but Google really deserves the points. :)
merh 8-Sep-21 4:04am    
Thanks Richard!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900