I am calling an api where result is coming this way {{'orderNo':123456}}
the same I am trying to access through these codes lines and But it is not working:
using System.Text.Json.JsonDocument doc = System.Text.Json.JsonDocument.Parse(payment["notes"]);
What I feel it should be very easy to access. Well, I just don't want to create any DTO for the same.
FYI, I can achieve this using DTO class like this:
RzOrderDto orderNo = System.Text.Json.JsonSerializer.Deserialize<RzOrderDto>(payment["notes"].ToString(),null);
public class RzOrderDto {
public string orderno { get; set; }
}
Now, here I don't want to use any object class but just want value of orderNo