I'm trying to get some part of string by substring and this is my string :{"samanState":"OK","samanResNum":"97d590e2-9ce3-49f9-85cf-2228b33cad57","samanTraceNo":"479936"}
I can't do something like this : substring(8,16) because this string is change every time. I want to get 479936
from that. I'm sure TraceNo":"
is static and never change so I did this :
<td>@(bankDepositHistoryItem.AdditionalData.Substring
(bankDepositHistoryItem.AdditionalData.IndexOf("TraceNo\":\""),
bankDepositHistoryItem.AdditionalData.Length- bankDepositHistoryItem.AdditionalData.IndexOf("TraceNo\":\"")-2)) </td>
but the out put is : TraceNo":"479936
How should I get this : 479936
I have to say that I Know this is possible with serialize and deserialize but I want to know if this is possible with substring or split or methods like these.
Many thanks