I have this string : [{"Weight":70,"CustomerId":45},{"Weight":30,"CustomerId":733}]
please note that quotation marks are parts of this string
I need to extract the digits for 'weight' and 'customerId' separately.
I tried to do it like this for weight :
MatchCollection Weightmatches = Regex.Matches(r["Formula"].ToString(), @"""Weight"":(\d+),");
(there might be more Weight or Customer numbers on this string)
but I can't seem to understand how to isolate the numbers alone.
please help!!
var results = new List<KeyValuePair<int, int>>();?