0

My question is simple, I have a response from an Api call that return in the format below.

{\"Mnin\":\"12345674\"}

I need to extract just the number from the string above,

that is "12345674"

Note: this number could be longer or shorter Thank you very much

  • Are you 100% sure that your response has the backslash in it? Or is that just how you see it when you hover over in the debugger? – ProgrammingLlama Feb 16 '21 at 08:33
  • Take a look at string's method `Split`. – Jacek Feb 16 '21 at 08:34
  • The backslash is just a delimiter, to separate multiple string, Yes this was exactly how the response was in debugger – Aikemefuna Feb 16 '21 at 08:36
  • 1
    "In the debugger" - the debugger shows you slashes not because here are slashes in the string but because there are literally quotes in the string. This is JSON, parse it using the recommended duplicate – Caius Jard Feb 16 '21 at 08:37
  • [FYI re what the debugger shows you](https://stackoverflow.com/questions/41172620/stop-visual-studio-debug-putting-slash-in-string-containing-double-quotes) – ProgrammingLlama Feb 16 '21 at 08:43

0 Answers0