I'm working with a string array which contains json value in NETCORE C#. For ex:
{"Name":"Carl","Age":"18"},{"Name":"Rick","Age":"40"}
Is use Split(",") but the array gets only one record a the value gets cut at {"Name":"Carl"
.
The result that I need is something like this:
string [0]= "Name":"Carl","Age":"18"
string [1]= "Name":"Rick","Age":"40"
Can someone explain me why comma doesn't work?
Details: don't suggest me to work it with json's packages because its something that needs to be done as shown. This Json string is stored in a db and needs to be read by my code, that's why I'm doing this.
I noticed that if i edit the json value like this:
{"Name":"Carl"|"Age":"18"};{"Name":"Rick"|"Age":"40"}
And split it by ;
I get what I'm looking for.